3 ms·
The only way for query performance to be truly predictable is for your data to be static. If that's not your situation then a query optimizer is incredibly help
by astine 8y ago
The only way for query performance to be truly predictable is for your data to be static. If that's not your situation then a query optimizer is incredibly helpful because it means that you don't have to rewrite your queries every time you add an index.
- bmdavi3 8y agoIt also means that as your data grows or shrinks, the optimizer will notice and change the plan accordingly if it makes sense. That means that 18 months after you implemented a feature you've long since forgotten about, you don't have to come back and figure out what the new plan should be. And that's huuuuge. You can find accounts of the db changing the plan from a good one to a bad one, but I'll go out on not that far of a limb and say that those are < 1% of the cases. Nobody complains about the queries they didn't have to come back and change. And the better the optimizer, the better that trade off will be.