Heikki Linnakangas wrote:
I'm worried about plan stability if we enable it by default. It could lead to nasty, hard to reproduce performance problems. Think about this scenario:
This is my main concern with the approach Tom suggested.
Also keep in mind that at least some application servers have a client-side prepared statement cache, so that even if the application used a non-prepared statement for the reports, the middleware prepares it anyway.
It's less of an issue if we only use this behaviour when binding the unnamed statement. The unnamed statement is quite "special" and is unlikely to be reused accidentally (for one thing, you can only have one unnamed statement..)
The patch I posted to -patches earlier uses this approach.
-O
---------------------------(end of broadcast)--------------------------- TIP 5: Have you checked our extensive FAQ?
http://www.postgresql.org/docs/faqs/FAQ.html