From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Gavin Sherry <swm(at)linuxworld(dot)com(dot)au> |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Prepared queries and ANALYZE |
Date: | 2003-04-28 04:57:10 |
Message-ID: | 11727.1051505830@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Gavin Sherry <swm(at)linuxworld(dot)com(dot)au> writes:
> Looking through the query preparing and stats analyze code, I noticed that
> prepared queries using an analyzed table are not replanned. I imagine that
> some users of prepared queries would not want the above behaviour, plan
> stability etc, but surely others would.
> I didn't notice any discusion of this in the list archives. Any technical
> reasons why this shouldn't happen?
Well, there are implementation reasons why it doesn't happen: there's no
infrastructure for determining which tables a prepared query depends on
nor for re-planning it if we did notice they'd changed.
But really this is a special case of the problem of "schema changed
underneath a plan", and yes it'd be nice to notice that and invalidate
the plan.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Sailesh Krishnamurthy | 2003-04-28 05:01:02 | Re: Prepared queries and ANALYZE |
Previous Message | Gavin Sherry | 2003-04-27 23:18:44 | Prepared queries and ANALYZE |