Database Tuning (MOSC)

MOSC Banner

Histograms - 10.2.0.4

edited May 16, 2011 4:07PM in Database Tuning (MOSC) 4 commentsAnswered
 

We have a table with highly skewed value distribution in one of the coulmns (see below)


SQL> select invoice_prepared,count(*) from invoice_header group by invoice_prepared;

I   COUNT(*)
- ----------
Y     737731
N         10

Its a 10.2.0.4 Database

we created histogram on this column as below

execute DBMS_STATS.GATHER_TABLE_STATS(OWNNAME => 'APPSDBA', TABNAME => 'INVOICE_HEADER',METHOD_OPT => 'FOR COLUMNS SIZE 2 INVOICE_PREPARED',CASCADE => TRUE);

We have 3 questions:

# 1) How can we verify that we now have histograms in place for this column that the optimizer will consider while selecting execution plan

# 2) How would we delete the histogram on this column if we want to

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center