Should you gather System Statistics?

While at the HotSOS Symposium, last month, I caused quite a stir when I recommended that folks should never gather system statistics.

Why such a stir?

It turns out this goes against what we recommend in the Oracle SQL Tuning Guide, which says “Oracle recommends that you gather system statistics when a physical change occurs in the environment”.

So, who right?

Well in order to figure that out, I spoke with Mohamed Zait, the head of the optimizer development team and Nigel Bayliss, the product manager for the optimizer, upon my return to the office.

After our discussions, Nigel very kindly agreed to write a detailed blog post that explains exactly what system statistics are, how they influence the Optimizer, and provides clear guidance on when, if ever, you should gather system statistics!

What did I learn from all this?

Don’t gather system statistics unless you are in a pure data warehouse environment, with a good IO subsystem (e.g. Exadata) and you want to encourage the Optimizer to pick more full table scans and never says never!

This entry was posted in Optimizer, Statistics and tagged , , . Bookmark the permalink.

2 Responses to Should you gather System Statistics?

  1. Rajeshwaran, Jeyabal says:

    Maria – thanks for the inputs.

    Recently we are planning to upgrade and migrate(to new server host) a database from 10.2 to 12.2 and it is a Hybrid database (has both oldt and DW style queries).

    would you still gathering the system stats? please advice.

    Also in the 10.2 database we have db_file_multiblock_read_count set to 8, while moving to 12.2 was planning to reset this param to its default value (as per the 12.2 docs @ – Kindly advice on this too.

Leave a Reply

Your email address will not be published. Required fields are marked *