请教个临时表的问题
--select col1,col2 from table1 into temp temp1 with no log;--select col1,col2 from table2 into temp temp1 with no log;
select a.*
from table3 a,temp1 b
where a.col1=b.col1
into temp temp2 with no log;
我有两个表都可以生成一个临时表temp1的记录
但其中一个table1生成的temp1与table3关联可以1分钟生成数据
另外一个table2生成的temp1与table3关联生成数据就要几个小时
这有可能是什么原因呢? 那就说可能的原因好了: table2太大~:em17: 不是都差不多一个2700一个3000
不是大小的原因 生成的临时表跟table1和table2的索引有没有关系啊 估计两条语句的执行计划不同!
回复 4# 卐卍
“卐卍”这两个字怎么读啊? 估计两条语句的执行计划不同!
回复卐卍
“卐卍”这两个字怎么读啊?
yunzhongyue 发表于 2010-11-10 21:11 http://bbs3.chinaunix.net/images/common/back.gif
两个字都是万(wan)。 执行计划不同是嘛意思啊 意思是一个走索引,一个走全表扫描!
页:
[1]