Real simple:
When you execute SQL against the database Oracle needs to know the fastest path to the data. When you compute stats Oracle uses those stats to generate that execution path to the requested data.
Do an explain plan on a query with stats and then run without stats so you can see.
Main Topics
Browse All Topics





by: angelIIIPosted on 2009-01-28 at 23:49:25ID: 23494998
the analyse command will store statistics about the data in the table (and it's indexes) in the system, so that the analyser for your query execution, which determines the explain plan, knows more about what plan might be better.
it will however ignore (or put less weight) in outdates stats, hence after a ANALYSE command, it will consider it again, so give you a better plan again.