Search
Navigation
Recent blog posts
- Oracle IN Condition and Multi Column Subqueries
- SQL For Dinosaurs
- Quickie script to run dbv on your database...
- Permissions for Autotrace
- Accuracy of PROFILER.SQL from Metalink Doc: 243755.1
- Recording Oracle System Stats for historical analysis...
- Shell Script to Run a SQLPLUS against all databases running on a server...
- Viewing command line args with Solaris ps utility...
- Orion IO Test Tool
- Documented Hints available in 11.2...
Books
User login
system stats
Recording Oracle System Stats for historical analysis...
dmann — Thu, 12/31/2009 - 14:27
If you are experimenting with gathering system statistics it might be helpful to archive your current settings and any intermediate settings you come up with along the way.
There is a way to save stats to a table using DBMS_STATS.CREATE_STAT_TABLE and gathering with DBMS_STATS.GATHER into that table, but the format is cryptic and it is nice to have the descriptive parameter names tagging along with the data. (In a future post I will cover format of the CREATE_STAT_TABLE format).
The current system stats info is held in the sys.aux_stats$ table. Since the format is a little wacky, I came up with the following table to hold stats and the following insert statement to populate it after every gathering of system stats.
Now you can easily query the values of old stats in the SYSTEM_STATS_HISTORY table: Read more »