Re: SQL Functions and plan time

From: Richard Huxton <dev(at)archonet(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: SQL Functions and plan time
Date: 2003-07-08 19:01:10
Message-ID: 200307082001.10558.dev@archonet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tuesday 08 Jul 2003 7:48 pm, Tom Lane wrote:
> Richard Huxton <dev(at)archonet(dot)com> writes:
> > Can I ask why, since the plan is constructed at query-time the parameters
> > aren't substitued *before* planning?
>
> Because then the plan couldn't be re-used. A SQL function may be
> executed many times in a query, so the plan has to be reusable.
> (Or, if you prefer, we have query-level caching of SQL function plans.)

Ah - I see. Fair enough

Thanks Tom.
--
Richard Huxton

In response to

Browse pgsql-general by date

  From Date Subject
Next Message The Hermit Hacker 2003-07-08 19:31:08 Re: Website (DNS) is hosed!!!
Previous Message Maksim Likharev 2003-07-08 18:57:18 Re: PG crash on simple query, story continues