4 ms·
Depending on the placeholder values the optimal plan may be very different. You -can- use a server side prepared statement to force it to -ahem- plan ahead but
by mst 5y ago
Depending on the placeholder values the optimal plan may be very different.
You -can- use a server side prepared statement to force it to -ahem- plan ahead but that's -usually- not actually worth it.
- SigmundA 5y agoThats why other databases have parameter sniffing. And using prepared statements only works on the same connection so of limited use. Luckily PostgreSQL's optimizer is very primitive and so planning doesn't take too much time, as it gets more advanced the lack of plan reuse will become more of an issue. Its already an issue with the LLVM JIT compilation time.