It’s possible to spend ages talking about the best ways of collecting, or creating, statistics on partitioned tables.
The possible strategies for maintaining partitioned tables, (exchange partition, split partition, drop partition etc.) the types of partitioning available, and the way that the optimizer plays with the stats as you do so, have kept changing over the years, and I’ve got a large set of examples designed to test what happens to the stats as you do things to the table – but it’s impossible to keep it up to date.
Doug Burns is writing a series of articles about the trials, tribulations, and successes about partitioned tables and statistics. The series was well worth reading and will give you an insight into the problems you may have to address, so I’ve produced a catalogue to make it easy to visit the individual chapters in order. Make sure you also read the comments and related links.
- Part 1 – In which we see a simple example and do a default stats collection
- Part 2 – In which we consider Global Stats
- Part 3 – In which subpartitions and aggregation cause problems
- Part 4 – In which our hero fights his way through stats aggregation woes
- Part 5 – In which we encounter a partition exchange
- Part 6a – In which we start to use dbms_stats.copy_table_stats()
- Part 6b – In which we see how reputable individuals handle their mistakes
- Part 6c – In which we hear about 10.2.0.5 and lots of bugs
- Part 6d – In which we revisit earlier errors and discuss the benefit of discussion
- Part 6e – In which we revisit earlier problem again and talk about a bug.
- Part 7 – Not in the original series, but an interesting (slow) experience in 11g
I thought I’d collate a few other items on partition stats and optimizer behaviour – mainly from Randolf Geist’s blog:
- March 2007: Subpartitions and Optimizer Stats
- April 2008: (a) Subpartition Pruning
- April 2008: (b) Exchange Partition and Aggregated Stats
- Mar 2009: (a) Partition Oddities and 10.2.0.4 bug
- Mar 2009: (b) List partitions
- June 2009 Dynamic Sampling and partitioned tables
- Jan 2012 Incremental partition statistics
And one from Kerry Osbourne – which lists a new granularity option, and a patch for 10.2.0.4
- Feb 2009: Maintaining statistics on a large partitioned table. (See also Metalink Doc ID: 6526370.8)
A couple (as pdf files) from David Kurtz, with a particular view to optimising Peoplesoft.
- Gathering aggregated stats on partitioned objects in 10g
- Gathering aggregated stats on partitioned object in 11gR2
And an investigation into an oddity with the optimizer when using partitioned indexes
- Feb 2011: Jokes of the CBO with local indexes (10.2.0.4, 11.1.0.7)
[…] A key topic of the discussion was related to Oracle statistics and the CBO. It was timely that the Oracle Scratchpad’s Jonathan Lewis posted a series created by Doug Burns all about stats. […]
Pingback by Log Buffer #183, a Carnival of the Vanities for DBAs | The Pythian Blog — March 19, 2010 @ 8:08 pm GMT Mar 19,2010 |
Statistics on Partitioned Tables – Contents…
When Jonathan Lewis decided it was time to post a list of the Partition Stats posts on his blog and Noons suggested I made them easier to track down, I listened. So this post will link to the others and, at least in the short term, I’ve also included …
Trackback by Doug's Oracle Blog — March 28, 2010 @ 11:05 pm BST Mar 28,2010 |
[…] Jonathan Lewis decided it was time to post a list of the Partition Stats posts on his blog and Noons suggested I made them easier to track down, I listened. So this post will […]
Pingback by Statistics on Partitioned Tables – All Things Oracle — August 1, 2012 @ 5:10 pm BST Aug 1,2012 |
[…] and manipulating stats the best reference I have is still a set of articles by Doug Burns, which I’ve collated here with a few from other […]
Pingback by Usage Stats « Oracle Scratchpad — January 24, 2013 @ 7:00 pm GMT Jan 24,2013 |
[…] https://jonathanlewis.wordpress.com/2010/03/17/partition-stats/ […]
Pingback by Partitioned Table Global Stats, they are not just decorative. | Rodrigo Righetti DBA — May 3, 2016 @ 6:54 pm BST May 3,2016 |
[…] Partition Stats […]
Pingback by Aggregated global statistics on partitioned tables or not ? — May 2, 2018 @ 2:32 pm BST May 2,2018 |
[…] Partition Stats (2007 – 2012) – a list of articles written by other people on the topic of staitistics on partitioned objects. […]
Pingback by Partitioning Catalogue | Oracle Scratchpad — February 7, 2022 @ 9:53 am GMT Feb 7,2022 |
[…] Partition Stats (2007 – 2012) – a list of articles written by other people on the topic of staitistics on partitioned objects. […]
Pingback by Statistics catalogue | Oracle Scratchpad — February 7, 2022 @ 11:20 am GMT Feb 7,2022 |
[…] Partition Stats (sub-catalogue) (Other Authors: 22) […]
Pingback by Catalog Catalogue | Oracle Scratchpad — February 21, 2022 @ 10:52 am GMT Feb 21,2022 |