X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 708E5D1B911 for ; Fri, 6 Feb 2004 08:52:58 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 93361-10 for ; Fri, 6 Feb 2004 04:52:55 -0400 (AST) Received: from serwer.skawsoft.com.pl (skawina.eu.org [80.48.213.66]) by svr1.postgresql.org (Postfix) with ESMTP id 91BA3D1D854 for ; Fri, 6 Feb 2004 04:52:53 -0400 (AST) Received: from klaster.net (backbone.zab.citynet.pl [212.244.6.69]) by serwer.skawsoft.com.pl (Postfix) with ESMTP id 10E292B3CB; Fri, 6 Feb 2004 09:52:53 +0100 (CET) Message-ID: <4023567E.1020406@klaster.net> Date: Fri, 06 Feb 2004 09:55:26 +0100 From: Tomasz Myrta User-Agent: Mozilla/5.0 (Windows; U; Win 9x 4.90; pl-PL; rv:1.6b) Gecko/20031208 X-Accept-Language: pl, en-us, en MIME-Version: 1.0 To: alvarezp@alvarezp.ods.org, Lista dyskusyjna pgsql-sql Subject: Re: [PERFORM] Seq scan on zero-parameters function References: <4207.192.168.0.64.1076051944.squirrel@alvarezp.ods.org> <40234207.6040207@klaster.net> <4795.192.168.0.64.1076056992.squirrel@alvarezp.ods.org> In-Reply-To: <4795.192.168.0.64.1076056992.squirrel@alvarezp.ods.org> Content-Type: text/plain; charset=ISO-8859-2; format=flowed Content-Transfer-Encoding: 8bit X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200402/63 X-Sequence-Number: 16754 Dnia 2004-02-06 09:43, Użytkownik Octavio Alvarez napisał: > Thanks for the hint. > > In fact, my current_period_id() is based on time, but it should be > constant along the query execution. I mean, I don't want some records > filtered with some values and other with other values... I'll have an > uncongruent recordset. Well - you didn't read the chapter I noticed you, did you? Look at function now(). It returns always the same value inside transaction. If your current_period_id() works the same way as now() then declare it as STABLE. Regards, Tomasz Myrta