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

Home -> Community -> Usenet -> c.d.o.misc -> Re: question about long running query with membership condition "in (...)"

Re: question about long running query with membership condition "in (...)"

From: Greg Forestieri <gforestieri9_at_yahoo.com>
Date: 6 Feb 2004 05:36:48 -0800
Message-ID: <6a8cdd95.0402060536.4eabe80@posting.google.com>


markg22003_at_yahoo.com (Mark) wrote in message news:<d0e5644c.0402050839.55753628_at_posting.google.com>...
> We are running oracle 8.17 on sunos 5.8
>
> Can anyone please explain why when I run the following individual
> queries they run for 1 second, but when I combine them, it runs
> forever.
>
> INDIVIDUAL QUERIES:
>
> select SUM(bytes),
> tablespace_name
> from sys.dba_free_space where tablespace_name in ('PTA')
> group by tablespace_name;
>
> select SUM(bytes),
> tablespace_name
> from sys.dba_free_space where tablespace_name in ('ILIS')
> group by tablespace_name;
>
> COMBINED QUERY:
>
> select SUM(bytes),
> tablespace_name
> from sys.dba_free_space where tablespace_name in ('PTA' ,'ILIS')
> group by tablespace_name;
>
> Thank you very much.

Forever is a long, long time.

In with more than one member does an implicit "OR" between the members. Explain plan should give a clue as to what is up.

Greg Received on Fri Feb 06 2004 - 07:36:48 CST

Original text of this message

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