Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> 10g gather_table_stats + method_opt +histograms

10g gather_table_stats + method_opt +histograms

From: Fedock, John (KAM.RHQ) <John.Fedock_at_us.kline.com>
Date: Tue, 21 Feb 2006 16:26:15 -0500
Message-ID: <5042FDC675779848A113F70D54F58749079074B6@KAMRICEXCLUS.us.kline.com>


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

--
http://www.freelists.org/webpage/oracle-l
Received on Tue Feb 21 2006 - 15:26:15 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US