select 中and 的效率问题
一秒一次郎 2013-12-11 03:09:53 一般来说,想在数据库中查询既满足索引A字段为123,索引B字段为456的数据,需要 select * from dbname where a=123 and b=456
还有一种解决方案就是把A字段和B字段的数据拼接后放一块,也就是把123456放到一个索引字段C里面,需要的时候
select * from dbname where c=123456
个人感觉第二种比一种要快,但是能快多少呢?有没有研究过,给个参考