Oracle数据库sql查询缓慢问题
select count(*) as RowCount from table1 where
Status is null and exists(select reference from table2 where actionUser = 'xxx' and flow = 'yyy' and table2.reference = table1.reference)
or Status = 'st'
我在Oracle数据库中执行这句语句查询的时候,非常缓慢,通常要等待40秒左右才会给出查询结果
但是如果去掉 or Status = 'st' 就非常快,1秒都不到
求高手大大们帮下忙,看看什么原因导致查询缓慢。