DBAsupport.com Forums - Powered by vBulletin
Results 1 to 5 of 5

Thread: Retention of SQL history in 10.2

  1. #1
    Join Date
    Mar 2002
    Location
    Mesa, Arizona
    Posts
    1,204

    Retention of SQL history in 10.2

    Does anyone know offhand what the retention rule is for dba_hist_sql_plan and dba_hist_sqlstat?
    "I do not fear computers. I fear the lack of them." Isaac Asimov
    Oracle Scirpts DBA's need

  2. #2
    Join Date
    Jun 2000
    Location
    Madrid, Spain
    Posts
    7,447
    as AWR, default 7 days

  3. #3
    Join Date
    Mar 2002
    Location
    Mesa, Arizona
    Posts
    1,204
    In one db, the timestamp column in dba_hist_sql_plan has values from June of 2007. Just curious if this is the best place to look for obsolete objects.

    There are currently 13,666 rows in sql_hist_sql_plan older than 7 days. I wonder what mechanism cleans these out.
    Last edited by KenEwald; 04-07-2008 at 03:55 PM.
    "I do not fear computers. I fear the lack of them." Isaac Asimov
    Oracle Scirpts DBA's need

  4. #4
    Join Date
    Jun 2000
    Location
    Madrid, Spain
    Posts
    7,447
    that is something else, as you can see dba_hist_sql_plan does not containt snap_id to purge, so most probably although not proved is that purging policy is probably based a join between dba_hist_sql_plan and some other hist_sql tables.

    probably the plan will be purged when the sql statement is no longer referenced in any hist_sql tables

  5. #5
    Join Date
    Aug 2007
    Location
    Cyberjaya,kuala lumpur
    Posts
    340

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width