If the database has been sitting around, and no access to it has been granted for over five months, would it still need to be analyzed if I return on the sixth month and run query, and it takes forever, and I notice that it has not been analyzed during its stagnant time?
If the database has truly been idle (that's what I'm assuming you mean by stagnant) and no activity has occurred during that time, then the statistics should still be current. For example, if you had a "read only" database that was periodically loaded with data, you'd only need to run statistics after the load and not again until the next load. This is because nothing is changing. Statistics need to be generated as data changes (inserts/updates/deletes). If those things are not happening, statistics won't change.
For More Information
- Dozens more answers to tough Oracle questions from Karen Morton are available.
- The Best Oracle Web Links: tips, tutorials, scripts, and more.
- Have an Oracle or SQL tip to offer your fellow DBAs and developers? The best tips submitted will receive a cool prize. Submit your tip today!
- Ask your technical Oracle and SQL questions -- or help out your peers by answering them -- in our live discussion forums.
- Ask the Experts yourself: Our SQL, database design, Oracle, SQL Server, DB2, metadata, object-oriented and data warehousing gurus are waiting to answer your toughest questions.
Dig deeper on Oracle database design and architecture
Have a question for an expert?
Please add a title for your question
Get answers from a TechTarget expert on whatever's puzzling you.