Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Where col in (num, num) vs where col in (select # from tab)

Where col in (num, num) vs where col in (select # from tab)

From: Allen <allenh_at_starbase.neosoft.com>
Date: 13 Jun 2002 14:26:39 -0500
Message-ID: <43B71900B1ED02F9.B62008260ADBAA4E.84BA062CC0ED0C57@lp.airnews.net>

I have a rather nasty query.. If I do a:

select columns from tables where col_value in (num1, num2, num3)

it takes several minutes. If I do a:

select columns from tables where col_value in (select num from temptable)

it runs much faster.

Any ideas why a where col in (list of values) is so much slower than where col in (select list of values from a table) ?

thx.. Allen Received on Thu Jun 13 2002 - 14:26:39 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US