Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: collecting statistics on table those have bulk inserts everyday..
Have you tried "alter table ... monitoring" and =
dbms_stats.gather_schema_stats (... 'GATHER STALE' ...) (see Metalink =
note Note:102334.1)
I seem to remember a discussion a few weeks ago on the list concerning =
the practice of gathering statistics regularly. Some of the opinions =
were:
- If you gather statistics on a regular basis, you will one day end up =
with some execution plans that you will not like. Predictability of =
execution plans is better than always trying to get the best execution =
plan. (which seems to be the opinion in Metalink note 44961.1 )
- You should be able to gather statistics regularly, the CBO should make =
better decisions with more recent information. Unless there are numerous =
bugs in the CBO, gathering statistics regularly (e.g. once a week) is a =
quick and easy way to implement it. If you are worried about ending up =
with some bad execution plans, then export the statistics =
(dbms_stats.export_schema_stats) before the analyze so that you can =
restore them and have the CBO return to a "known" behaviour, or save =
execution plans with stored outlines (Metalink note 67536.1)
I would incline to the second way of doing things, unless you have a lot = of time to spare to determine for each object the best time to analyze.
> -----Original Message-----
> Syed Jaffar Hussain
>=20
-- Archives are at http://www.freelists.org/archives/oracle-l/ FAQ is at http://www.freelists.org/help/fom-serve/cache/1.html -----------------------------------------------------------------Received on Mon Apr 12 2004 - 12:27:35 CDT
![]() |
![]() |