Follow up
Ram, October 05, 2018 - 7:38 am UTC
Brilliant! But, why do we still need to use the condition sample_time>sysdate-90 when we have snap_id condition?
October 06, 2018 - 5:59 am UTC
because the begin_interval may be close but not exactly equal to sysdate-90
Follow up
Ram, October 05, 2018 - 8:48 am UTC
I quickly checked and found that dba_hist_snapshot doesn't go far. In my database, the min snap_id is associated to a day which sysdate-45 whereas I need all the info from sysdate-90.
I think this is because of the default snapshot retention which is 45 days.
October 06, 2018 - 5:59 am UTC
In which case, you are querying the entire table anyway, no?
on Dictionary stats
Rajeshwaran, Jeyabal, October 05, 2018 - 1:57 pm UTC
By any chance, gathering a dictionary stats ( dbms_stats.gather_dictionary_stats) will help here? kindly advice.
October 06, 2018 - 6:02 am UTC
Quite possibly. In the absence of any execution plan or any other information...its hard to diagnose