From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Kris Jurka <books(at)ejurka(dot)com> |
Cc: | mljv(at)planwerk6(dot)de, pgsql-general(at)postgresql(dot)org |
Subject: | Re: Prepared Statements |
Date: | 2008-01-12 23:46:50 |
Message-ID: | 24034.1200181610@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Kris Jurka <books(at)ejurka(dot)com> writes:
> On Thu, 10 Jan 2008, mljv(at)planwerk6(dot)de 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
From | Date | Subject | |
---|---|---|---|
Next Message | Rodrigo E. De León Plicet | 2008-01-13 04:22:16 | Re: UPDATE .. JOIN? |
Previous Message | Tom Lane | 2008-01-12 23:38:24 | Re: Possible bug in PostgreSQL 8.3beta4 (postgres process segfaults) |