Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> Re: Any quick way to remove histograms?
> It would be nice if they would just provide a delete_histogram_stats
> procedure, but I guess I'm just being lazy.
Bug 5579764 adds this functionality to dbms_stats.delete_column_stats. I believe it's available as a one off for 10.2.0.3 and will be included in 10.2.0.4.
Just as a heads up on using dbms_stats.set_column_stats as mentioned by Alberto & Wolfgang: I don't believe that either example provided takes into consideration if the table has partition (or subpartition) level stats (vs. just global/table level stats). If it does, I think you would have to loop over each partition as there is currently no "cascade" functionality with set_column_stats (but there is "cascade_parts" in delete_column_stats.) I don't have a test case handy but just check user_tab_col_statistics as well as user_part_col_statistics to verify set_column_stats has worked as expected.
Regards,
Greg Rahn
http://structureddata.org
-- http://www.freelists.org/webpage/oracle-lReceived on Fri Mar 16 2007 - 18:57:21 CDT
![]() |
![]() |