logoalt Hacker News

Sesse__yesterday at 9:55 PM3 repliesview on HN

The immediate problem: How do you know which one is better without running them?


Replies

haroldltoday at 12:25 AM

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

HighlandSpringyesterday at 10:20 PM

Could you A/B at random, use that to collect data and eventually feed that back in to prefer A or B depending on the shape of the query?

show 1 reply
scarmigyesterday at 9:57 PM

Not someone familiar with DB internals, but could you run in parallel, at least for reads?

show 1 reply