Re: parametrized statements, but always replan?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Dave Cramer <pg(at)fastcrypt(dot)com>
Cc: Kevin Murphy <murphy(at)genome(dot)chop(dot)edu>, pgsql-jdbc(at)postgresql(dot)org
Subject: Re: parametrized statements, but always replan?
Date: 2006-12-21 05:42:22
Message-ID: 14091.1166679742@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Dave Cramer <pg(at)fastcrypt(dot)com> writes:
> The only time prepared statements won't replan is if you re-use the
> prepared statement, which your code does not.
> However... AFAIK, postgresql does not plan based on the parameter.

This was changed in 8.2: for an unnamed statement the planning step is
delayed until Bind time, so that the actual parameter values can be
considered.

regards, tom lane

In response to

Browse pgsql-jdbc by date

  From Date Subject
Next Message Didier BRETIN 2006-12-21 10:00:48 ant specif task for pg_dump and pg_restore
Previous Message Kevin Murphy 2006-12-20 21:58:12 State of the art in large scale inserts