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: does anybody recomends using dbms_stats.gather_schema_stats with for columnns size skewonly

Re: does anybody recomends using dbms_stats.gather_schema_stats with for columnns size skewonly

From: Mladen Gogala <gogala_at_sbcglobal.net>
Date: Mon, 24 Jan 2005 14:29:15 -0500 (EST)
Message-Id: <1105922373l.22381l.0l@medo.noip.com>

On 01/16/2005 05:15:54 PM, Alfonso Le?n wrote:
> Hello:

>=20

> What is the recomended aproach to collect the statistics?
>=20
> Thanks in advance for your suggestions

My advice is to collect statistics in two passes: 1) Estimate (compute) statistics for tables and indexes. 2) Collect column histograms

Two passes are necessary, because collecting column histograms misses =20 row statistics for the table. Here is how a typical "COMPUTE" script =20 would look like, in my world:

DBMS_STATS.GATHER_DATABASE_STATS (

   estimate_percent  =3D> NULL,
   block_sample      =3D> FALSE,
   method_opt        =3D> 'FOR TABLE',
   granularity       =3D> 'DEFAULT',
   cascade           =3D> TRUE,
   options           =3D> 'GATHER');

DBMS_STATS.GATHER_DATABASE_STATS (
   estimate_percent  =3D> NULL,
   block_sample      =3D> FALSE,
   method_opt        =3D> 'FOR COLUMNS SIZE SKEWONLY',
   degree            =3D> NULL,
   granularity       =3D> 'DEFAULT',
   cascade           =3D> FALSE,
   options           =3D> 'GATHER');



--=20
Mladen Gogala
Oracle DBA

--
http://www.freelists.org/webpage/oracle-l
--
http://www.freelists.org/webpage/oracle-l
Received on Mon Jan 24 2005 - 14:30:02 CST

Original text of this message

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