X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 0F74853422 for ; Thu, 24 Mar 2005 14:12:35 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 29608-06 for ; Thu, 24 Mar 2005 14:12:32 +0000 (GMT) Received: from metux.de (seven.metux.de [193.16.1.1]) by svr1.postgresql.org (Postfix) with ESMTP id 2BAAC535C1 for ; Thu, 24 Mar 2005 14:12:30 +0000 (GMT) Received: (from weigelt@localhost) by metux.de (8.12.10/8.12.10) id j2OECYPW002648 for pgsql-performance@postgresql.org; Thu, 24 Mar 2005 15:12:34 +0100 Date: Thu, 24 Mar 2005 15:12:33 +0100 From: Enrico Weigelt To: pgsql-performance@postgresql.org Subject: Re: clear function cache (WAS: SQL function inlining) Message-ID: <20050324141233.GA933@nibiru.borg.metux.de> Reply-To: weigelt@metux.de Mail-Followup-To: pgsql-performance@postgresql.org References: <7635.1111596928@sss.pgh.pa.us> <20050324133248.GB31203@nibiru.borg.metux.de> <20050324134240.GD20726@dcc.uchile.cl> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050324134240.GD20726@dcc.uchile.cl> User-Agent: Mutt/1.4.1i X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests= X-Spam-Level: X-Archive-Number: 200503/509 X-Sequence-Number: 11214 * Alvaro Herrera wrote: > On Thu, Mar 24, 2005 at 02:32:48PM +0100, Enrico Weigelt wrote: > > > BTW: is it possible to explicitly clear the cache for immutable > > functions ? > > What cache? There is no caching of function results. Not ? So what's immutable for ? > > I'd like to use immutable functions for really often lookups like > > fetching a username by uid and vice versa. The queried tables > > change very rarely, but when they change is quite unpredictable. > > Maybe you should use a stable function if you fear we'll having function > result caching without you noticing. hmm, this makes more real evaluations necessary than w/ immuatable. AFAIK stable functions have to be evaluated once per query, and the results are not cached between several queries. cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact@metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- ---------------------------------------------------------------------