Re: Prepared queries and ANALYZE

From: Gavin Sherry <swm(at)linuxworld(dot)com(dot)au>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Prepared queries and ANALYZE
Date: 2003-04-28 05:37:17
Message-ID: Pine.LNX.4.21.0304281532240.21086-100000@linuxworld.com.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, 28 Apr 2003, Tom Lane wrote:

> 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.

Yes. Speaking to Bruce on IRC I was reminded that prepared queries exist
on a single backend which makes such this problem less pertinent than a
general solution, which you mentioned.

Gavin

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Zeugswetter Andreas SB SD 2003-04-28 07:51:05 Re: STABLE functions
Previous Message Sumaira Ali - 2003-04-28 05:25:44 LockData (Lock.h)