Re: JDBC, prepared queries, and partitioning

From: "Stephen Denne" <Stephen(dot)Denne(at)datamail(dot)co(dot)nz>
To: "Oliver Jowett" <oliver(at)opencloud(dot)com>
Cc: <josh(at)agliodbs(dot)com>, "Kris Jurka" <books(at)ejurka(dot)com>, "PostgreSQL - JDBC" <pgsql-jdbc(at)postgresql(dot)org>, "Simon Riggs" <simon(at)2ndquadrant(dot)com>
Subject: Re: JDBC, prepared queries, and partitioning
Date: 2008-02-14 00:48:41
Message-ID: F0238EBA67824444BC1CB4700960CB4804A4F75D@dmpeints002.isotach.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Oliver Jowett wrote
> Instead, we could change that so that whenever a Bind for the unnamed
> statement is received, the query is replanned.

I like the idea.
A while back I investigated whether partitioning would be helpful in my circumstance, and the inability to get the query plans I was expecting was one of the reasons I didn't make use of it.
I had other reasons why I didn't chose to use partitioning, which would probably mean that even with this change I still wouldn't use partitioning.
However I would be able to make good use of such a change if, for example, I'd be able to use indexes for parameterised LIKE expressions.

> are there
> actually clients that reuse the unnamed statement in use, and would they
> be badly affected by this change?

If such clients exist, then yes they would be.
At the least, they'd start getting poorer performance due to repeated planning.
At worst, they may be desiring to reuse the plan generated by the first bind.

But with a bit more work, this could be new behaviour that defaults to the existing process unless a configuration variable is set.

Is this the kind of change that could go into an 8.3.1 release or would it have to wait till 8.4?

Stephen Denne.

Disclaimer:
At the Datamail Group we value team commitment, respect, achievement, customer focus, and courage. This email with any attachments is confidential and may be subject to legal privilege. If it is not intended for you please advise by reply immediately, destroy it and do not copy, disclose or use it in any way.

__________________________________________________________________
This email has been scanned by the DMZGlobal Business Quality
Electronic Messaging Suite.
Please see http://www.dmzglobal.com/services/bqem.htm for details.
__________________________________________________________________

In response to

Browse pgsql-jdbc by date

  From Date Subject
Next Message Tom Lane 2008-02-14 05:59:26 Re: JDBC, prepared queries, and partitioning
Previous Message Guillaume Smet 2008-02-14 00:35:03 Re: JDBC, prepared queries, and partitioning