Re: a question for the way-back machine

From: Martijn van Oosterhout <kleptog(at)svana(dot)org>
To: Gurjeet Singh <singh(dot)gurjeet(at)gmail(dot)com>
Cc: Ben <bench(at)silentmedia(dot)com>, Richard Huxton <dev(at)archonet(dot)com>, PostgreSQL general <pgsql-general(at)postgresql(dot)org>
Subject: Re: a question for the way-back machine
Date: 2006-12-15 10:04:57
Message-ID: 20061215100457.GA958@svana.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Fri, Dec 15, 2006 at 02:29:48PM +0530, Gurjeet Singh wrote:
> Is it session level !!??? I think it is query level; don't we discard the
> plan after each query? AFAIK, only the plpgsql and other pl/ sisters cache
> the plan for the queries inside their code-blocks. I am under the impression
> that if a query is fired multiple times, it will be planned every time,
> unless we user PREPAREd stetements.

In the OP's case, he's talking about query fired from a trigger written
in pl/pgsql, so it's cached for the session. Normal queries sent by the
client are not cached ofcourse. In his example it's not the INSERT
that's being cached, it's a query in the trigger.

Have a nice day,
--
Martijn van Oosterhout <kleptog(at)svana(dot)org> http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Henrik Zagerholm 2006-12-15 10:41:39 Needed files - embedded postgres
Previous Message Magnus Hagander 2006-12-15 09:53:02 Re: could not write to log -> PANIC -> System down