Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> Re: does anybody recomends using dbms_stats.gather_schema_stats with for columnns size skewonly
On 01/16/2005 05:15:54 PM, Alfonso Le?n wrote:
> Hello:
>=20
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');
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-lReceived on Mon Jan 24 2005 - 14:30:02 CST
![]() |
![]() |