Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Does table monitoring handle all statistics for you?

Re: Does table monitoring handle all statistics for you?

From: Jonathan Lewis <jonathan_at_jlcomp.demon.co.uk>
Date: Tue, 26 Jun 2001 20:35:03 +0100
Message-ID: <993584161.27747.0.nnrp-14.9e984b29@news.demon.co.uk>

MONITOR simply collects in real time
the number of changes you make to
the table - it does NOT write any stats
back to the USER_TABLES columns.

If your user_tables.num_rows says
1,000,000, and you do 50,000 inserts
on the table, then user_tables.num_rows
will still say 1,000,000; but there will be a row in view USER_MODIFICATIONS
for that table with

    user_modifications.inserts = 50,000

The CBO and the ANALYZE command
will not make any use of that value -
it simply acts as a flag to the dbms_stats procedure to suggest that the table has
changed a lot since the last analyze.

dbms_stats collects (if I recall correctly) the current number of rows physically in the table, the number of blocks, the
number of free blocks, and the average
free space per block; (it misses a couple that the ANALYZE command gathers),
and a few figures about each column
such as number of nulls, high and low
values, number of distinct values.

--
Jonathan Lewis

Host to The Co-operative Oracle Users' FAQ
http://www.jlcomp.demon.co.uk/faq/ind_faq.html

Author of:
Practical Oracle 8i: Building Efficient Databases
See http://www.jlcomp.demon.co.uk/book_rev.html

Seminars on getting the best out of Oracle
See http://www.jlcomp.demon.co.uk/seminar.html






Brian Tkatch wrote in message <3b3894c2.319452859_at_news.alt.net>...

>Then what statistics does DBMS_STATS gather that MONITORING does not?
>I think that is what I do not understand
>
Received on Tue Jun 26 2001 - 14:35:03 CDT

Original text of this message

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