RE: drop a histogram on a single column

From: Allen, Brandon <>
Date: Mon, 15 Dec 2008 12:08:43 -0700
Message-ID: <64BAF54438380142A0BF94A23224A31E10A316EF09@ONEWS06.oneneck.corp>

Doesn't seem to work for me on

SQL> select * from v$version;


Oracle Database 10g Release - 64bit Production

SQL> create table t as select owner from dba_objects;

Table created.

SQL> exec dbms_stats.gather_table_stats('sys','t',method_opt=>'for columns owner');

PL/SQL procedure successfully completed.

SQL> select num_distinct, low_value, high_value, density, histogram from dba_tab_columns where table_name='T';

------------ ----------------------------------------------------------------

HIGH_VALUE                                                          DENSITY HISTOGRAM

---------------------------------------------------------------- ---------- ---------------
12 4442534E4D50 564552544558 .000028752 FREQUENCY

SQL> exec dbms_stats.delete_column_stats('sys','t','owner',col_stat_type=>'HISTOGRAM'); BEGIN dbms_stats.delete_column_stats('sys','t','owner',col_stat_type=>'HISTOGRAM'); END;

ERROR at line 1:
ORA-06550: line 1, column 7:
PLS-00306: wrong number or types of arguments in call to 'DELETE_COLUMN_STATS'

-----Original Message-----

From: Allen, Brandon

According to Metalink 5579764.8, it looks like it's only available in

-----Original Message-----

From: [] On Behalf Of Greg Rahn

Version >=
dbms_stats.delete_column_stats(..., col_stat_type=>'HISTOGRAM');

Privileged/Confidential Information may be contained in this message or attachments hereto. Please advise immediately if you or your employer do not consent to Internet email for messages of this kind. Opinions, conclusions and other information in this message that do not relate to the official business of this company shall be understood as neither given nor endorsed by it.

Received on Mon Dec 15 2008 - 13:08:43 CST

Original text of this message