Archive for the ‘Optimizer’ Category

Automatic DB_FILE_MULTIBLOCK_READ_COUNT

Thursday, August 14th, 2008

Note: Originally this experiment was from a post I wrote on the Oracle Forum: Database - General. I recommend that you read Jonathan Lewis' summarization of the thread instead of reading all 671 posts (as of today). You will spend much less time and get more out ...

Oracle 11g: Incremental Global Statistics On Partitioned Tables

Wednesday, July 16th, 2008

Previously I blogged about the new and improved DBMS_STATS.AUTO_SAMPLE_SIZE used to calculate NDV in Oracle 11g and now I wanted to touch on another new feature of DBMS_STATS in 11g: Incremental Global Statistics On Partitioned Tables. Before Incremental Global Stats (Two-Pass Method) When DBMS_STATS.GATHER_TABLE_STATS collects statistics on a partitioned table, ...

Using Bitmap Indexes Effectively

Thursday, May 29th, 2008

Recently I was reading this thread, "Trying to make use of bitmap indexes" on the Oracle Forum. Before I had finished a working example, Jonathan Lewis had posted his response which was on par with my thoughts. Since this is a topic I see frequently, I thought ...

Null-Aware Anti-Join

Thursday, May 22nd, 2008

Recently someone showed me a query execution plan with an operation of HASH JOIN ANTI NA. At first, it was thought maybe it was a bug and the operation had a type-o in it, but after further research it was discovered it was a valid operation and a new ...

Choosing An Optimal Stats Gathering Strategy

Wednesday, March 26th, 2008

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 ...

There Is No Time Like ‘%NOW%’ To Use Dynamic Sampling

Wednesday, March 5th, 2008

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 ...

ANSI Outer Joins And Lateral Views

Monday, February 18th, 2008

A few months ago the Oracle Optimizer Team did a blog post entitled Outerjoins in Oracle. In the Lateral View section of that post they go through some examples and discuss how a query is transformed with the ANSI outer join syntax. I thought it would be useful ...

What Are Your System Statistics?

Wednesday, January 2nd, 2008

I've been working on a few test cases and I'm in search of some real-world data. If your production Oracle database uses system statistics, either Workload Statistics or Noworkload Statistics, and you are willing to share them, please post a comment with the output from the following two ...