Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
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

pgsql-jdbc by date

Next:From: Simon RiggsDate: 2008-02-13 22:04:43
Subject: Re: JDBC, prepared queries, and partitioning
Previous:From: Simon RiggsDate: 2008-02-13 21:55:56
Subject: Re: JDBC, prepared queries, and partitioning

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group