Forum Stats

  • 3,874,599 Users
  • 2,266,752 Discussions
  • 7,911,910 Comments

Discussions

peek LAST_ANALYZED for SYSDATE range predicates for selectivity estimation/optimization

Rainer Stenzel
Rainer Stenzel Member Posts: 64 Bronze Badge
edited Feb 22, 2019 3:16AM in Database Ideas - Ideas

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."

ctriebSven W.berx
3 votes

Active · Last Updated

Comments