December 2017 M T W T F S S « Nov 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
Comonly used Tags12c Audio Autonomous beginners Big Data birthday cursor_sharing Database DBA DBMS_XPLAN Docker events Exadata Execution Plans Github Hints histograms In-Memory IoT JSON Multitenant My_Activities OOW optimizer Oracle Oracle Database 12c Partitioning Performance REST Security Sharding SQL Monitor statistics syntax top_tip UKOUG Usergroup video
- AskTom (5)
- Autonomous Database (1)
- Beginners (1)
- Database In-Memory (4)
- Docker (2)
- Events (9)
- Exadata (1)
- IoT (1)
- Multitenant (2)
- New Features (3)
- OOW (8)
- Optimizer (9)
- Oracle Database 12c New Features (16)
- Partititoning (1)
- Sharding (1)
- Statistics (1)
- Syntax (4)
- technical_papers (2)
- Uncategorized (1)
- Whitepapers (1)
Tag Archives: statistics
At the recent OUG Ireland conference I had the privilege of participating in a panel discussion on the Oracle Database. During the course of the session the topic of Optimizer histograms came up. As always, a heated discussion ensued among … Continue reading
I got a great follow up question to my earlier blog on Online Statistics Gathering; that I thought might be of interest to other and worthy of a short post of its own.
The question related to sample size used to gather histograms on a table that originally had its statistics gathered via a direct path load operation.
Let’s look at any example: Continue reading
I was recently asked if I would ever recommend locking table statistics as a way of preventing execution plans from changing. As, with a lot questions’ regarding the Optimizer and statistics the answer was “it depends”.
There are definitely some edge cases where locking the statistics is the best approach but I wouldn’t generally recommend it to achieve plan stability. Before I share the edge cases where I believe locking statistics would help, lets first look at exactly what locking table statistics does and why it’s not a good approach to plan stability.
From Oracle Database 10g onwards you have had the ability to lock the optimizer statistics for a table or schema, via the DBMS_STATS package.
The LOCK_STATS procedure locks all of the statistics related to a table, including the table statistics (number of rows, number of blocks etc.), column statistics (min and max values, number of distinct values etc.), histograms and the statistics on all dependent indexes. Once statistics are locked, no modifications can be made to those statistics until the statistics have been unlocked or if the FORCE option is used in the GATHER_*_STATS procedures. Continue reading
Although there have been a number of significant changes to the Oracle Database in 12c, some of my favorite new features are actually the small enhancements, designed to make your life a little easier. So, I decided to spend some time this year sharing the details on these small but extremely useful features.
One such enhancement is Online Statistics Gathering.
Whenever an index is created, Oracle automatically gathers optimizer statistics for that index. The database piggybacks the statistics gather on the full data scan and sort operation necessary for the index creation. This approach has worked so well since it was introduced in 9i, few people even realize it’s happening. Continue reading