3 ms·
It’s a declarative language and it’s compiled into an execution "plan", and parameterised queries (bind variables, prepared statements, whatever you want to cal
by pgh 4y 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 https://youtu.be/eurwtUhY5fk