Re: Slow query
Date: Thu, 07 Feb 2008 15:00:45 GMT
"Sashi" <smalladi_at_gmail.com> wrote in message
> 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;
> 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,
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