Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

PostgreSQL doesn't even cache its own byte code, it replans every time!


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.


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




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: