4 ms·
You create formulas to estimate the cost of running a given query plan. Use statistics collected about the tables (e.g. how many rows) to try to be accurate. Th
by haroldl 15d ago
You create formulas to estimate the cost of running a given query plan. Use statistics collected about the tables (e.g. how many rows) to try to be accurate. The topic is "Cost Based Optimization".
- Sesse__ 15d agoIf you have formulas that actually match reality, what do you need the LLM for? An optimizer is perfectly capable of finding the optimal plan if it has a perfect estimator. In fact, if you could only estimate the number of rows in each subplan perfectly, you have as good as solved the problem already.
- locknitpicker 15d ago> If you have formulas that actually match reality, what do you need the LLM for? That's the key question. I think LLMs allow people with no context or background or know-how to dive into projects and see some results being presented to them, but they don't have the context or skillset to tell what they see before them. This paves the way to people laying grand claims about achievements because of LLMs. Their claim is that LLMs know best primarily because LLMs knew more than them, not that the output is good or desirable.
- pbalau 15d ago> If you have formulas that actually match reality, what do you need the LLM for? Because one could be in that state where they are trying to use a tech they know preciously little about to solve a problem they know nothing about. This reminds me of a request we got from our "AI Department": if you build us a proper shares market simulator, we will build you an awesome agent that can trade shares. They seemed quite confused when I pointed out that if we could build such a simulator, we wouldn't need them anymore.
- ants_a 14d agoThis is how the built in planner works already. It generates all possible plans and picks the one with the lowest cost. But calculating the cost is based on statistics and models, and these are wrong. Usually useful, but always wrong.