Skip to content
Branch: master
Find file History
Latest commit e9e62fe Jun 14, 2019
Permalink
Type Name Latest commit message Commit time
..
Failed to load latest commit information.
partitioned readme Jun 14, 2019
README.md partitioned tab hist Jun 14, 2019
example.lst histogram history Jun 14, 2019
example.sql
h_hist.sql histogram history Jun 14, 2019
hist.sql histogram history Jun 14, 2019

README.md

List history information for histograms associated with a table

This is a proof-of-concept script to list information on histogram changes over time for a given table. In particular, it reports:

  • Changes to histogram bucket counts.
  • When histograms were added and removed for each table column.

The main script is "h_hist.sql".

It requires a DBA account and you supply two parameters:

SQL> @h_hist table_name user_name       [If the user_name is 'USER', the current username will be assumed]

For a worked example, see spool file example.lst and a test script example.sql

The subdirectory "partitioned" includes a script for partitioned tables. This is brand new and might need further debugging. Currently I have not implemented anything for a subpartitioned table.

WARNING: The example.sql script will drop a table called SALES. Always use test databases.

NOTE: The earliest release I've tested this is Oracle Database 12c Release 2 but Release 1 should be OK too

DISCLAIMER:
-- These scripts are provided for educational purposes only.
-- They are NOT supported by Oracle World Wide Technical Support.
-- The scripts have been tested and they appear to work as intended.
-- You should always run scripts on a test instance.

You can’t perform that action at this time.