1。select column1,column2,...效率高
2。select ... from table1,table,...where...
比
select ... from table1 where ...
//while{
select ... from table2 where...
//while {
select * from table3 ...
效率高。
3。where 子句中效率高的条件是
搜索的索引列,不一定是要选择的列,换句话说,最合适的索引的列 时出现在where子句中的列。
2。select ... from table1,table,...where...
比
select ... from table1 where ...
//while{
select ... from table2 where...
//while {
select * from table3 ...
效率高。
3。where 子句中效率高的条件是
搜索的索引列,不一定是要选择的列,换句话说,最合适的索引的列 时出现在where子句中的列。
有些比较权威的资料或是实例就更好了。
其它的高手们在实际的项目中都是怎么做的呢?
请多多发表高见,
其它的查询效率问题也可拿出来大家讨论。
:)
一般来说
用SELECT * 在网络上传送时比只选几列的查询在速度上要差一点