Hacker News new | ask | show | jobs
by pgh 1209 days ago
It’s a declarative language and it’s compiled into an execution "plan", and parameterised queries (bind variables, prepared statements, whatever you want to call them) are passed at runtime. When you dynamically build queries by concatenation you bypass this compilation phase (parse, compute plan, etc.), and spend unnecessary time on near identical queries.

If you want many more gory details, this is a good watch: https://youtu.be/eurwtUhY5fk