Re: JDBC, prepared queries, and partitioning

From: "Stephen Denne" <Stephen(dot)Denne(at)datamail(dot)co(dot)nz>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "Simon Riggs" <simon(at)2ndquadrant(dot)com>, "Kris Jurka" <books(at)ejurka(dot)com>, "Josh Berkus" <josh(at)agliodbs(dot)com>, "PostgreSQL - JDBC" <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: JDBC, prepared queries, and partitioning
Date: 2008-02-13 22:00:26
Message-ID: F0238EBA67824444BC1CB4700960CB4804A4F68C@dmpeints002.isotach.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Tom Lane wrote
> "Stephen Denne" <Stephen(dot)Denne(at)datamail(dot)co(dot)nz> writes:
> > Isn't it more a case of
> > "even a minor variation in just one of this query's
> parameters can result in wildly different cost estimate,
> > so I really need to re-plan it every time."
>
> The $64 problem is not that; it is that certain optimizations will not
> be applied, period, unless the planner is dealing with values known
> at plan time.

Are there two problems:
1) My query could always be faster had the planner known the parameter values. (re Josh's inital question)
2) The chosen plan works fairly well in the general case, but for some parameter values it takes forever.

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 Simon Riggs 2008-02-13 22:04:43 Re: JDBC, prepared queries, and partitioning
Previous Message Simon Riggs 2008-02-13 21:55:56 Re: JDBC, prepared queries, and partitioning