10g gather_table_stats + method_opt +histograms

  • From: "Fedock, John (KAM.RHQ)" <John.Fedock@xxxxxxxxxxxx>
  • To: <oracle-l@xxxxxxxxxxxxx>
  • Date: Tue, 21 Feb 2006 16:26:15 -0500

Looking at Cost Based Oracle Fundamentals by Johnathan Lewis, page 454.   It 
discusses how by default in 10g, gather_table_stats will get histograms on all 
tables.

I verified that was true by looking in dba_tab_histograms.

I also read in MetaLink, that by setting "method_opt => 'FOR ALL COLUMNS SIZE 
1", histograms will NOT be created.

While testing, I see that running as I have below, the histograms are still 
being created.  Am I missing something or am I misinformed?

System is Oracle 10.1.0.3, on HP-UX.
 
exec DBMS_STATS.DELETE_TABLE_STATS('rf','state_table');

select *  from dba_tab_histograms where table_name = 'STATE_TABLE'
< no rows returned - as expected >

exec dbms_stats.gather_table_stats ('rf','state_table', method_opt => 'FOR ALL 
COLUMNS SIZE 1',CASCADE => TRUE); 

select *  from dba_tab_histograms where table_name = 'STATE_TABLE'
< rows returned - NOT as I expected >


Thanks for any advice
John Fedock
john.fedock [AT] us.kline.com

--
//www.freelists.org/webpage/oracle-l


Other related posts: