[GENERAL] Parameterized prepared statements

2011-08-31 Thread Craig Ringer
Hi folks While replying to another query, something struck me as interesting that I thought I'd raise. People here often raise issues where preparing a parameterised query and executing the prepared query results in a plan that's sub-optimal for the particular values substituted into it. The

Re: [GENERAL] Parameterized prepared statements

2011-09-04 Thread Martijn van Oosterhout
On Wed, Aug 31, 2011 at 09:44:09AM +0800, Craig Ringer wrote: > Things like pre-parsed prepared statements that're re-planned on > every execution are often proposed as solutions to this. This has me > wondering: rather than expensively re-planning from scratch, would > it be possiblet to adjust th

Re: [GENERAL] Parameterized prepared statements

2011-09-04 Thread Dmitriy Igrishin
Hey Craig, Things like pre-parsed prepared statements that're re-planned on every > execution are often proposed as solutions to this. This has me wondering: > rather than expensively re-planning from scratch, would it be possiblet to > adjust the planning process so that *multiple* alternative pl