Home » RDBMS Server » Performance Tuning » Long Running Query (Oracle 9,Unix)
icon5.gif  Long Running Query [message #490882] Fri, 28 January 2011 00:32 Go to next message
gurukrishnan
Messages: 1
Registered: January 2011
Location: Chennai
Junior Member
Hi folks,

We have a long running query. Its taking more than half hour to fetch records. so could pls help me out on this.....

Query:
SELECT *
FROM TableA,
TableB,
TableC,
TableD
WHERE TableB.KEY_ID(+) = TableA.KEY_ID
AND TableB.SOURCE_ID(+) = TableA.SOURCE_ID
AND TableC.KEY_ID(+) = TO_CHAR (TableA.LINE_ID)
AND TableC.SOURCE_ID(+) = TableA.SOURCE_ID
AND TableD.KEY_ID(+) = TO_CHAR (TableA.LINE_ID)
AND TableD.SOURCE_ID(+) = TableA.SOURCE_ID

Note:TableA doesnt have any index.We dnt have any rights to create index
Re: Long Running Query [message #490883 is a reply to message #490882] Fri, 28 January 2011 00:36 Go to previous message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
Since NOBODY can optimize SQL just by looking at it, we need a few more details.
http://www.orafaq.com/forum/m/433888/136107/#msg_433888
Please refer to URL above & be sure to provide the details requested:
1) DDL for all tables & indexes
2) EXPLAIN PLAN
3) output from SQL_TRACE & tkprof

It would be helpful if you followed Posting Guidelines - http://www.orafaq.com/forum/t/88153/0/
Previous Topic: Create Index vs Rebuild Index
Next Topic: Using a stats table instead of regular stats to get a plan
Goto Forum:
  


Current Time: Sun May 05 07:59:45 CDT 2024