RE: Query tuning exercise: what to look for in a 10053 trace

  • From: "Schultz, Charles" <sac@xxxxxxxxxxxxx>
  • To: "Allen, Brandon" <Brandon.Allen@xxxxxxxxxxx>, <oracle-l@xxxxxxxxxxxxx>
  • Date: Tue, 25 Jul 2006 13:24:47 -0500

I see you have been reading his "tuning by cardinality feedback" paper.
Or perhaps "under the hood..."? =)
I have read them, but it takes a long time for me to absorb the
wonderful insights these guys have.
 
From an academic standpoint, I am trying to figure out why the CBO is
using a different join order - perhaps this is a vain and useless
endeavor, but I am curious.

________________________________

From: Allen, Brandon [mailto:Brandon.Allen@xxxxxxxxxxx] 
Sent: Tuesday, July 25, 2006 1:13 PM
To: Schultz, Charles; oracle-l@xxxxxxxxxxxxx
Subject: RE: Query tuning exercise: what to look for in a 10053 trace


You may be able to figure it out with a 10046 trace and a simple explain
plan on the statement, then compare the estimated cardinalities to the
actual number of rows returned from each step and most likely there will
be a significant difference between the estimate and the actual in at
least one place and that will usually point you in the right direction.
From there you have to figure out why the estimate is off - probably due
to skewed data - then see if histograms will help, or if you have to
hint the SQL or use stored outlines (or SQL profiles in 10g).  I don't
have much experience with the 10053 trace either so can't really help
you on that one.  Wolfgang Breitling has a good white paper on it that
you might find useful in case you haven't already read that - should be
able to find it on google.
 
Regards,
Brandon
 

From:   Schultz, Charles  
Sent:   Tuesday, July 25, 2006 12:39 PM 


I have a query that is going bad when new stats are gathered on the
underlying tables. I checked the stats, and they seem accurate. 


Privileged/Confidential Information may be contained in this message or
attachments hereto. Please advise immediately if you or your employer do
not consent to Internet email for messages of this kind. Opinions,
conclusions and other information in this message that do not relate to
the official business of this company shall be understood as neither
given nor endorsed by it.

Other related posts: