|
Category :
Database
Resources -> Database Administration -> Troubleshooting & Solutions
DB Version
:
Oracle 9i
OS Details :
Sun Solaris9
Oracle 9.2 introduces the
new V$SEGMENT_STATISTICS dynamic performance view.
This view lets you see many different statistics on the usage of
segments since instance startup. You do not have to turn on monitoring
or take any special steps to begin using
this view. Just make sure that the STATISTICS_LEVEL parameter for the
database is either set to TYPICAL or ALL. Once common question that
arises from using this view is : Why isn't the table you trying to get
statistics for not appearing when you query the view?
The answer is simple. There has
been no activity since the instance startup on that particular table.
Try doing a select count(*) on the table for which you are trying to
get segment stats and then query the v$segment_statistics view.
Addendum :
Jonathan Lewis (http://www.jlcomp.demon.co.uk/)
has issued this warning on using the v$segment_statistics on large
databases:
Warning - for general use,
it is better to look at v$segstat to find hot spots, then use the
object_id and data_object_id to identify the interesting objects.
v$segment_statistics is a
based on a join between a very large memory structure and two or three
data dictionary objects. Queries against it are not cheap on a large
system.
|