Analyzing tables and indexes -- Need some Tips
JP, May 02, 2003 - 8:52 am UTC
Dear Tom
Thanks for your all time great suggestions and help.
I have also read the third point mentioned by Gunjeet from Oracle Manual 'Performance Tuning Guide and Reference'.
However, my question is as follows.
I have few tables that are frequently purged from the application point of view. Basically one application inserts data in those tables and another application reads data from those tables and after doing its work, it deletes all the records from those tables and it happens very frequently.
I am using CBO. Analyse my database on a daily basis. But as CBO use dictionary statistics, always the statistics would not be correct in this case. As for example when I analyse those tables, Might be those tables contains around 10K rows. And after deletion those will be empty. At that moment what Optimiser actually consider? As I know Optimiser will consider analysed statistics i.e. 10K.
Will RBO beneficial for this case? Can I use RULE hint? Or any other alternative way I can take care this type of scenario using CBO. Please give some suggestion.
Thanks in advance.
Best Regards
JP
May 02, 2003 - 9:27 am UTC
As for RMAN -- it is because each block not only has to be read for the incremental -- but it must be inspected to see if we need to copy it -- rather then just bulk read/write -- it *probably* will be slower but as with all things in life, there will be exceptions (backing up over a slow WAN for example -- that might reverse the slow to fast)
As for the empty/full table situation -- sounds like you *meant* to use advanced queues which implements this functionality for you (and would even let you magically add more or less back end processes to process the queue without having to write lots of code yourself to mediate access to the data)....
But if the queries are only against this table (eg: you are not using this table in multi-table statements like joins, subqueries, etc) -- using the RBO or hinting it would be acceptable short term (AQ is the right answer). In 9iR2 you have optimizer_dynamic_sampling that can work wonders as well (search the 9iR2 docs on otn for that if you are interested)
which all tables are right candidate ... for twice a week analyze
Pravesh Karthik from India, May 15, 2005 - 11:35 pm UTC
Tom,
Is there a way to see which tables are getting more updates and inserts ?. we have hundreds of tables and we analyze once in a week. some of the fact tables need to analyzed twice a week. In order to know which all tables are right candidate for analyze twice or thrice a week can you help us in knowing that.
Thanks for your consideration,
Pravesh Karthik
A reader, November 03, 2006 - 5:46 am UTC
November 03, 2006 - 10:41 am UTC
brilliant insight, we'll keep that in mind.
LOL!
Michel Cadot, November 03, 2006 - 10:46 am UTC