From: dn.perl on 13 Jul 2010 00:38 On Oracle 10 hosted on a FreeBSD server, I am seeing a disproportionate difference in response time between two queries which should take same amount of time. my_folder is a table with only 22,000 entries. Query 1 : (takes 22-23 seconds) select f.foldername from my_folder f where f.foldername in (select f1.foldername from my_folder f1, my_aa a, my_bb b where some-conditions) and f.foldername.isactive = 1 ; Query 2 : (I aborted it after 15 minutes) select f.foldername from my_folder f where f.foldername not in (select f1.foldername from my_folder f1, my_aa a, my_bb b where some-conditions) and f.foldername.isactive = 1 ; The only difference is that query 2 uses 'NOT IN' clause instead of 'IN' clause. Why should this happen?
|
Pages: 1 Prev: How to find the grantees of a role Next: NOT IN clause vs IN clause |