←back to thread

60 points matt_d | 1 comments | | HN request time: 0.199s | source
Show context
bob1029 ◴[] No.45081131[source]
Adapting the plan at runtime seems like the most universal solution for optimizer edge cases and is already implemented in the big 3.

If you think about it, the adaptive mechanism doesn't have to be perfect to have a lot of uplift. Even coarse grain detection and starting from zero can make a huge difference if the alternative would be a query burning up the server for hours and a failed batch job.

replies(2): >>45110879 #>>45111024 #
1. RaftPeople ◴[] No.45110879[source]
> Adapting the plan at runtime seems like the most universal solution for optimizer edge cases and is already implemented in the big 3

But the issues frequently aren't edge cases and frequently are at runtime (i.e. new query), it's just the best the optimizers can do with limited info (cardinality) and a limited duration to evaluate alternatives.

EDIT:

I just realized I misunderstood the post I responded to. I thought adapt meant update the query plan that was previously stored, but I believe the meaning is during execution of the query.