Re: Slow query
Date: Thu, 07 Feb 2008 15:00:45 GMT
Message-ID: <x2Fqj.65419$K%.11983@trnddc04>
"Sashi" <smalladi_at_gmail.com> wrote in message
news:f9df77a7-e4dc-463f-a8d7-6f1fcf9ec5c9_at_e25g2000prg.googlegroups.com...
> Hi all, I'm running a simple select by joining two tables.
> I get an output of about 1.3 million rows:
>
> SQL> SELECT count(*) from QIPADMIN.OBJ_NAME_PROF O, QIPADMIN.OBJ_PROF
> N WHERE N.OBJ_ID=O.OBJ_ID;
>
> COUNT(*)
> ----------
> 1322139
>
> When I run the select query as follows:
>
> SELECT UPPER(OBJ_NAME), N.OBJ_IP_ADDR1 ,
> N.OBJ_IP_ADDR2 ,N.OBJ_IP_ADDR, N.OBJ_IP_ADDR4
> from QIPADMIN.OBJ_NAME_PROF O, QIPADMIN.OBJ_PROF N
> WHERE N.OBJ_ID=O.OBJ_ID
>
> it takes almost three hours to run. The server is only hosting the
> data server and the CPU usage is low.
>
> Any pointers in helping me resolve this issue are appreciated.
> Thanks in advance,
> Sashi
What is the explain plan?
explain plan for
SELECT UPPER(OBJ_NAME), N.OBJ_IP_ADDR1 ,
N.OBJ_IP_ADDR2 ,N.OBJ_IP_ADDR, N.OBJ_IP_ADDR4
from QIPADMIN.OBJ_NAME_PROF O, QIPADMIN.OBJ_PROF N
WHERE N.OBJ_ID=O.OBJ_ID;
select * from table(dbms_xplan.display)
Received on Thu Feb 07 2008 - 09:00:45 CST