Search Postgresql Archives

Re: Prepared Statements

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Kris Jurka <books@xxxxxxxxxx> writes:
> On Thu, 10 Jan 2008, mljv@xxxxxxxxxxxx wrote:
>> What do you mean with "longer lifespan"? Doesn't the JDBC driver uses the
>> PREPARE Sql Statement and therefore the prepared Statement has the same
>> lifespan as the connection? If so, as connections are pooled and never
>> closed, the prepared Statement will last forever. What if the table analyzes
>> changes and a better execution plan could be found?

> Data and stats changes do not trigger a replan.

Note that this is no longer true as of 8.3: a stats update from ANALYZE
(either manual or autovacuum) will trigger invalidation of cached plans.

			regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
       choose an index scan if your joining column's datatypes do not
       match

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux