Hacker News new | ask | show | jobs
by cromd 1570 days ago
> [...] execution plan is formed by the DB engine before the parameters are even considered

Is this really possible if the server considers table statistics (i.e. frequencies of certain values) when forming a plan?

1 comments

Typically the SQL statement will be parsed to a logical plan first, which then gets optimized and then turned into a physical execution plan. Statistics are used for a second layer of optimization on the physical execution plan.