Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Does table monitoring handle all statistics for you?
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>...Received on Tue Jun 26 2001 - 14:35:03 CDT
>Then what statistics does DBMS_STATS gather that MONITORING does not?
>I think that is what I do not understand
>