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 7847D563A7 for ; Wed, 9 Mar 2005 00:58:14 +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 61618-04 for ; Wed, 9 Mar 2005 00:58:09 +0000 (GMT) Received: from floppy.pyrenet.fr (floppy.pyrenet.fr [194.250.190.2]) by svr1.postgresql.org (Postfix) with ESMTP id 37902563A4 for ; Wed, 9 Mar 2005 00:58:09 +0000 (GMT) Received: by floppy.pyrenet.fr (Postfix, from userid 106) id A87BD3198E; Wed, 9 Mar 2005 01:58:12 +0100 (MET) From: Gaetano Mendola X-Newsgroups: pgsql.performance Subject: Re: pl/pgsql faster than raw SQL? Date: Wed, 09 Mar 2005 01:54:32 +0100 Organization: Hub.Org Networking Services Lines: 26 Message-ID: <422E4948.3090208@bigfoot.com> References: <1110284432.4905.18.camel@dicaprio.akademie1.de> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Complaints-To: usenet@news.hub.org To: =?UTF-8?B?TWFya3VzIEJlcnRoZWF1IOKYrQ==?= User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) X-Accept-Language: en-us, en In-Reply-To: <1110284432.4905.18.camel@dicaprio.akademie1.de> X-Enigmail-Version: 0.90.1.1 X-Enigmail-Supports: pgp-inline, pgp-mime To: pgsql-performance@postgresql.org X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.004 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200503/146 X-Sequence-Number: 10851 Markus Bertheau ☭ wrote: > Hi, I have the following strange situation: that is no so strange. I have an example where: SELECT * FROM my_view WHERE field1 = 'New'; ==> 800 seconds SELECT * FROM my_view; ==> 2 seconds the only solution I had was to write a function table with the second select in a loop that was returnin the row if the field1 was equal = 'New'. It's strange but happen. Regards Gaetano Mendola