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 -> Re: Where col in (num, num) vs where col in (select # from tab)

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

From: Sybrand Bakker <postbus_at_sybrandb.demon.nl>
Date: Thu, 13 Jun 2002 21:32:35 +0200
Message-ID: <ughudqqg0jmjf5@corp.supernews.com>

"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 address
Received on Thu Jun 13 2002 - 14:32:35 CDT

Original text of this message

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