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

Home -> Community -> Mailing Lists -> Oracle-L -> RE: Query tuning help needed

RE: Query tuning help needed

From: Jamadagni, Rajendra <Rajendra.Jamadagni_at_espn.com>
Date: Tue, 29 Apr 2003 10:36:40 -0800
Message-ID: <F001.0058C1BC.20030429103640@fatcity.com>


Liam,

I am working on tuning a process where one select statement is executed 38 times and another is executed 17 times, all implicit SELECTS in a stored procedures. And because of data, neither of these queries were using the right index (it was a between on a date column, value passed in was a date variable).

So, I spent about 40 minutes and got these (2 SELECTS) to execute only once for each piece of data and changed the where clause. Guess what, the procedure that used to take about 14 minutes to run, now takes less than 4.

I had to deal with PL/SQL tuning in addition to SELECTS, but total 2 hours I spent was well worth it, as this data is crucial to the stats that you see for baseball players ...

Raj




Rajendra dot Jamadagni at nospamespn dot com All Views expressed in this email are strictly personal. QOTD: Any clod can have facts, having an opinion is an art !

-----Original Message-----
Sent: Tuesday, April 29, 2003 2:07 PM
To: Multiple recipients of list ORACLE-L

I agree with you Raj - if you're saying that the in-line view is the new feature. I recently inherited an incredibly complex SQL statement with several in-line views that took over 2 hours to run, the optimiser simply couldn't cope.

I took the old-fashioned route and broke the statement up by creating temporary tables and replacing the in-line views with these temporary tables. Even with creating the tables the whole thing now runs in about 15 mins.

Furthermore it took me hours to work out what the damn SQL was doing before I could rewrite it. Stick to the KISS methodology is my advice.


-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: Jamadagni, Rajendra
  INET: Rajendra.Jamadagni_at_espn.com

Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
San Diego, California        -- Mailing list and web hosting services
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).

Received on Tue Apr 29 2003 - 13:36:40 CDT

Original text of this message

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