sql2008查询慢
下面这语句在sql2000上查询很快,在SQL2008上要6分钟,是啥原因啊
select top 1 c.iindex,table_caption,table_En,table_multi,d.table_name,d.presere
from chkuserlst b,chkflow a,FlowTab c,tabname d where b.kguid=a.kguid
and isnull(dealed,0)<>1
and a.FlowTable=c.Table_name and a.FlowTable=d.table_name
and not exists (select a0188 from CHKFLOWIDEA d
where d.kguid=a.kguid
and a0188='-1')
and ((b.A0188='-1')
or ((b.a0188 in (select e.kguid from userinfo e,a01holdrole f where e.kguid=f.roleid and f.a0188=-1))
))
order by c.iindex