|
Different Condition,Diffenrent topic -->Different Result
how can we draw the conclusions:
"
NOT EXISTS 比EXISTS 慢是因为EXISTS操作在发现第一条符合条件的记录时就返回,NOT EXSITS 要把所有记录比较才得出结论。
"
"
EXISTS也很快,但取反的NOT EXISTS使其速度大大降低了
"
查询速度的快慢 跟具体 子查询有关,怎能 说 exists 就比 not exists快?
not exists ( select 1 from TABLE_人口 where 性别='变态')
当然很慢。 |
|