How will I know when to run the oracle table statistics?

I have a situation Here.Several weeks back, one of my application developer complained about the performance issue in one of the application. I looked at the table statistics, statistics on the table were outdated and ran the table statistics, query ran a lot faster. The same problem occurred in another application, and hoping that oracle will take the right decisions based on the statistics, I ran the statistics for the tables involved in the query, but this time things got worse? Why is this? According to oracle documentation the optimizer must have updated statistics on the tables and indexes that surround these tables, so how do we decide when to run the statistics on the tables by making sure that we have no worse things. Thank you

You don't tell us your version of db, but if you're on 10g and above, Oracle marks as out-of-date statistics when the RASSI percentage reaches or crosses the 10%. 11.1 from automatic work, managed by the ABP process runs nightly 10om at 02:00 on weekdays (can't recall for weekends) and supports the same. The question, when to collect the statistics is actually very subjective in your environment. Most of the time, it would be a weekly or a night and work in a data warehouse, in the next window ETL. You would need to play with the amount of the percentage of blocks of the table before you would be able to come to percentage that can work for your plans in a good way. I also saw the return of cardinality plays a large role in the exercise sometimes. You can watch here as well.

HTH

Aman...

Tags: Database

Similar Questions

Maybe you are looking for