Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Where col in (num, num) vs where col in (select # from tab)
"Allen" <allenh_at_starbase.neosoft.com> wrote in message
news:43B71900B1ED02F9.B62008260ADBAA4E.84BA062CC0ED0C57_at_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
Without
- version - optimizer - execution plan
this is a crystall ball question
And those have worn out here.
Regards
-- Sybrand Bakker Senior Oracle DBA to reply remove '-verwijderdit' from my e-mail addressReceived on Thu Jun 13 2002 - 14:32:35 CDT