Tuesday, May 1, 2012

Optimizer statistics History Information

The following is used to get the optimizer statistics' history retention value and the timestamps for which statistics are available to be restored to the oracle database:
DECLARE
r number
a timestamp;
BEGIN
a:=dbms_stats.get_stats_history_availability;
r:=dbms_stats.get_stats_history_retention;
dbms_output.put_line(a||'--'||r);
END;

No comments: