Posts Tagged ‘ Optimizer ’

Creating Optimizer Trace Files

August 18, 2011
By

Many Oracle DBA’s are probably familiar with what Optimizer trace files are and likely know how to create them. When I say “Optimizer trace” more than likely you think of event 10053, right? SQL code like this probably is familiar then: In 11g, a new diagnostic events infrastructure was implemented and there are various...

Read more »

Implicit Datatype Conversion + Histograms = Bad Execution Plan?

June 8, 2011
By

Earlier today I exchanged some tweets with @martinberx about some optimizer questions and after posting more information on the ORACLE-L list, I was able to reproduce what he was observing. The issue: DB: 11.2.0.2.0 – 64bit I have a small query with a little error, which causes big troubles. The relevant part of the...

Read more »

Reading Parallel Execution Plans With Bloom Pruning And Composite Partitioning

October 12, 2010
By

You’ve probably heard sayings like “sometimes things aren’t always what they seem” and “people lie”. Well, sometimes execution plans lie. It’s not really by intent, but it is sometimes difficult (or impossible) to represent everything in a query execution tree in nice tabular format like dbms_xplan gives. One of the optimizations that was introduced...

Read more »

DBMS_STATS, METHOD_OPT and FOR ALL INDEXED COLUMNS

October 14, 2008
By

I’ve written before on choosing an optimal stats gathering strategy but I recently came across a scenario that I didn’t directly blog about and think it deserves attention. As I mentioned in that previous post, one should only deviate from the defaults when they have a reason to, and fully understand that reason and...

Read more »

Choosing An Optimal Stats Gathering Strategy

March 26, 2008
By

Recently the Oracle Optimizer Development Team put out a White Paper entitled Upgrading from Oracle Database 9i to 10g: What to expect from the Optimizer. This paper discusses the main differences between 9i and 10g in the subject area of the Optimizer and Statistics. As G.I. Joe said, “Now we know! And knowing is...

Read more »

There Is No Time Like '%NOW%' To Use Dynamic Sampling

March 5, 2008
By

I recently came across a query in which the Optimizer was making a poor cardinality estimate, which in turn caused inefficient join type, which in turn caused the query to run excessively long. This post is a reenactment of my troubleshooting. The Suspect SQL The original SQL was quite large and had a fairly...

Read more »

Oracle Optimizer Development Team Starts A Blog

December 5, 2007
By

Since the introduction of the Cost Based Optimizer (CBO) in Oracle 7.0, people have been both fascinated and terrified by it and the statistics that feed it. There has long been a belief that a degree in witchcraft or black magic is required to successfully work with the CBO. Some people feel this shroud...

Read more »