RE: Poor performance with Histogram

  • From: "Christian Antognini" <Christian.Antognini@xxxxxxxxxxxx>
  • To: <oracle-l@xxxxxxxxxxxxx>
  • Date: Tue, 12 Dec 2006 18:49:22 +0100

> 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
--
//www.freelists.org/webpage/oracle-l


Other related posts: