pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Maciek Sakrejda <msakrejda@truviso.com>
Cc: Radosław Smogura <rsmogura@softperience.eu>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: binary patch problems
Date: Mon, 19 Sep 2011 20:39:31 -0400
Message-ID: <25673.1316479171@sss.pgh.pa.us> (raw)
In-Reply-To: <CAH_hXRatdSJQwwiUAn0+-Nta=XSQPV=sdFHGGE0t3ckhV1sXag@mail.gmail.com>
References: <4E4ADB2A.5040902@gmail.com>
	<4E774962.4060904@nitorcreations.com>
	<16752.1316443632@sss.pgh.pa.us>
	<201109191926.43305.rsmogura@softperience.eu>
	<CAH_hXRatdSJQwwiUAn0+-Nta=XSQPV=sdFHGGE0t3ckhV1sXag@mail.gmail.com>

Maciek Sakrejda <msakrejda@truviso.com> writes:
> I think what Tom is saying is that you'll be able to set
> prepareThreshold to 1 in the driver (always use named server-side
> prepared statements) and the server will automagically do the right
> thing. Right now, the big problem is that only unnamed prepared
> statements include the "feature" of being able to consider parameters
> in the query plan (since unnamed statements are not reused, there's no
> sense in planning them before you have parameters).

Right.  We've rejiggered the backend so that planning is delayed until
parameter values are available in all cases.  (If the code finds that
the plans it's getting with the parameters aren't materially better than
a generic plan would be, it'll eventually go back to using generic
plans.  But hopefully you will never need to club it over the head to
avoid doing that.)

Anyway, this isn't going to hit the street for another year, so there's
no reason to worry about it too much right now.  I'm just saying you
shouldn't invest a lot of work in related areas without being aware that
that change is coming.

			regards, tom lane



view thread (20+ messages)  latest in thread

Message-ID: <25673.1316479171@sss.pgh.pa.us>
Permalink:  ../25673.1316479171@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/25673.1316479171@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-jdbc@postgresql.org
  Cc: tgl@sss.pgh.pa.us, msakrejda@truviso.com, rsmogura@softperience.eu
  Subject: Re: binary patch problems
  In-Reply-To: <25673.1316479171@sss.pgh.pa.us>
  References: <4E4ADB2A.5040902@gmail.com> <4E774962.4060904@nitorcreations.com> <16752.1316443632@sss.pgh.pa.us> <201109191926.43305.rsmogura@softperience.eu> <CAH_hXRatdSJQwwiUAn0+-Nta=XSQPV=sdFHGGE0t3ckhV1sXag@mail.gmail.com> <25673.1316479171@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox