Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

Section 5: Managing Optimizer Statistics > Using Historical Statistics

Using Historical Statistics

Images Whenever statistics are updated, the previous statistics are filed away for future use, if needed. One has the option to then restore the previously collected statistics and put them into use once again. This is useful in situations where newly collected statistics do not lead to an optimal execution plan, and you want to revert to previously collected statistics from which acceptable performance was realized.

Example

In this example, the statistics restored for the specified table will be as of the timestamp indicated.

Images

The DBMS_OPTSTAT_OPERATIONS view contains the history of all schema-level and database-level statistics gathering operations.

Images

By querying this view and then using the timings shown one can decide which set of historical statistics for a given object or target might be useful.


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial