Insights into Statistics, Query Optimization and the Oracle Optimizer

  • February 2, 2018

Copying Histograms and Extended Column Statistics

Nigel Bayliss
Product Manager

Support added a new MOS note recently that includes a couple of scripts that query histogram and extended column statistics definitions and then generates scripts for creating them in other databases. Depending on your settings, the Oracle Database can create histograms and extended column statistics automatically, so you might want to capture what you have in one system and apply some changes to another.

The scripts are intended to be examples so they should be adapted to meet your specific requirements. This is the note:

How to Transfer Histograms or Extended Column Statistics between Databases(Doc ID 2340023.1) 

If anyone would like to suggest improvements, then please leave a comment.

Bear in mind that you can use Data Pump to copy optimizer statistics and optimizer metadata (such as column usage stats) wholesale from one database to another if that's what you'd prefer to do instead. There's a link in the MOS note that shows you how to copy SQL plan directives too.

Be the first to comment

Comments ( 0 )
Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.