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

Home -> Community -> Mailing Lists -> Oracle-L -> RE: Poor performance with Histogram

RE: Poor performance with Histogram

From: Christian Antognini <Christian.Antognini_at_trivadis.com>
Date: Tue, 12 Dec 2006 18:49:22 +0100
Message-ID: <F2C9CCA71510B442AF71446CAE8AEBAF8B55B5@MSXVS04.trivadis.com>

> Note that you need to force the creation of the (silly) histogram
> because "size skewonly" or "size auto" do not gather histograms for
> unique columns.

Sorry Wolfgang, on this specific point I cannot agree... In fact it really depends on the distribution. Below you find an example.

Cheers,
Chris

SQL> create table t as select rownum n from all_objects;

Table created.

SQL> insert into t select n+1000000 from t;

51832 rows created.

SQL> commit;

Commit complete.

SQL> create unique index i on t (n);

Index created.

SQL> exec dbms_stats.gather_table_stats(user,'t',method_opt=>'for all columns size skewonly',cascade=>true)

PL/SQL procedure successfully completed.

SQL> select count(*) from user_tab_histograms where table_name = 'T';

  COUNT(*)


       255

--
http://www.freelists.org/webpage/oracle-l
Received on Tue Dec 12 2006 - 11:49:22 CST

Original text of this message

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