Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> Re: DBMS_STATS [resend chomped version]
Note in-line
Regards
Jonathan Lewis
http://www.jlcomp.demon.co.uk/faq/ind_faq.html The Co-operative Oracle Users' FAQ
http://www.jlcomp.demon.co.uk/seminar.html Optimising Oracle Seminar - schedule updated May 1st
> 3. I like your idea of creating a table to hold the sample size for each
> table in the schema. Other columns could hold the reanalyze interval, date
> of next analyze, etc. This would ensure each table was analyzed
> appropriately.
I like the idea as well, with the following caveats.
Oh and it mightsuffer in a
<JPL>
The critical point is that the control table is populated intelligently
by someone who understand the data.
The biggest drawback is the traditional battle-cry:
We do that because the person who worked here 12 years ago set it up that way, and we're not going to change it.
The requirement for statistics will change with the evolution of the database and its users. My viewpoint is that this is a reference table that summarises the documentation that specified the database in the first place. Technically it should be derived from the database specification (the bit that goes:
table X will grow at M rows per month critical entry points to table X are
predicate 1 predicate 2
</JPL>
For example what my comments in 1 above mean - if correct and its a while since I was at college - is that the package would need to answer the following question about each analyzed segment.
<JPL>
Definitely not the intention.
But a good reason for suitably size LMTs, so you can easily spot the tables or indexes that are growing faster than predicted and revise you understanding of the data, hence revisit you assumptions about required statistics.
</JPL>
I think what I am saying that if we buy the argument that one should not sample every x days (hours, years), because we care about the appropriateness of the stats and not their 'freshness' then building an automated system to gather appropriate stats becomes a non-trivial task.
<JPL>
Quite agree.
Fortunately, most tables and most columns can be
covered adequately by a small sample which is
affordable (in terms of resources); so we only
need to be intelligent about a few critical columns
I forgot to mention the bit where you don't analyze, but just use dbms_stats.set_system_stats to put in the correct numbers where Oracle can't work them out (or spends too much time trying).
</JPL>
-- 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 Wed Jun 23 2004 - 07:45:14 CDT
![]() |
![]() |