我有3个表t1,t2,t3,每个表有35K个记录。最佳查询写入
select t1.col1,t2.col2,t3.col3
from table1 t1,table2 t2,table3 t3
where t1.col1 = t2.col1
and t1.col1 = 100
and t3.col3 = t2.col3
and t3.col4 = 101
and t1.col2 = 102;
需要更多时间才能返回结果(15秒)。我有适当的索引。
什么是重写它的最佳方式?
并且这返回结果?你有t1.col2 = 100 _and_ t1.col2 = 102 - 有趣的标准! – 2010-08-19 23:58:53
抱歉错字错误。 – Sharpeye500 2010-08-20 00:10:18