From: | "Stephen Denne" <Stephen(dot)Denne(at)datamail(dot)co(dot)nz> |
---|---|
To: | "Simon Riggs" <simon(at)2ndquadrant(dot)com> |
Cc: | "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:10:56 |
Message-ID: | F0238EBA67824444BC1CB4700960CB4804A4F69D@dmpeints002.isotach.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-jdbc |
Simon Riggs wrote
> On Thu, 2008-02-14 at 10:45 +1300, Stephen Denne wrote:
> > Simon Riggs wrote
> > > ISTM we need a way to say "this query's parameters vary wildly at
> > > execution time, so I really need to re-plan it every time".
> >
> > If the wild variations don't affect the cost estimate, they
> won't affect the plan?
>
> Cost estimates are made at planning time. If you don't
> replan, no, they
> won't.
What I meant was that for some queries, replanning with wildly different parameter values will always select the same plan.
That'd happen if the distribution from which the parameter value is chosen was flat, and the operation involving the parameter doesn't affect selectivity (eg "equals" rather than "greater than").
Though I guess in that case that it isn't possible to have a "wildly" different value.
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.
__________________________________________________________________
From | Date | Subject | |
---|---|---|---|
Next Message | Kris Jurka | 2008-02-13 22:15:10 | Re: JDBC, prepared queries, and partitioning |
Previous Message | Simon Riggs | 2008-02-13 22:04:43 | Re: JDBC, prepared queries, and partitioning |