Preserving Statistics using DBMS_STATS.LOCK_TABLE_STATS
(Doc ID 283890.1)
Last updated on AUGUST 04, 2019
Applies to:Oracle Database - Standard Edition - Version 10.1.0.2 and later
Oracle Database - Enterprise Edition - Version 10.1.0.2 and later
Oracle Database - Personal Edition - Version 10.1.0.2 and later
Information in this document applies to any platform.
This document outlines how to use DBMS_STATS.LOCK_TABLE_STATS to preserve statistics.
The purpose of DBMS_STATS.LOCK_TABLE_STATS is to lock table statistics:
- Prevent automatic statistic gathering where this may otherwise produce poor plans. As such it is most useful for volatile tables whose data changes frequently and for whom poor plans may be generated with certain data sets.
NOTE: Locking without statistics being gathered implies the use of dynamic sampling (if enabled). Locking statistics implies that these representative values provide a good plan for all.
This document is intended for DBAs.
To view full details, sign in with your My Oracle Support account.
Don't have a My Oracle Support account? Click to get started!