Skip to Main Content

Database Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

peek LAST_ANALYZED for SYSDATE range predicates for selectivity estimation/optimization

Rainer StenzelDec 6 2018 — edited Feb 22 2019

Statistics get STALE for the most recent time period quickly by nature as there is (suppositionally) no extrapolation applied by the optimizer,

so selectivity estimations for predicates involving SYSDATE relations tend to diverge more and more with aging statistics.

Maybe an easy and reliable approach would be to use the LAST_ANALYZED date of the involved  column/table instead of the actual SYSDATE for the optimizations selectivity estimation.

"The other aspect that always changes is time. People have tried but it’s very difficult to stop time. When things worked well, it was at a different point in time than now when things have suddenly gone wrong."

Comments
Post Details
Added on Dec 6 2018
4 comments
487 views