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 3C44E52964 for ; Thu, 21 Apr 2005 16:24:11 -0300 (ADT) 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 75490-09 for ; Thu, 21 Apr 2005 19:24:01 +0000 (GMT) Received: from metux.de (seven.metux.de [193.16.1.1]) by svr1.postgresql.org (Postfix) with ESMTP id 791DD53827 for ; Thu, 21 Apr 2005 16:23:57 -0300 (ADT) Received: (from weigelt@localhost) by metux.de (8.12.10/8.12.10) id j3LJNwPY023279 for pgsql-performance@postgresql.org; Thu, 21 Apr 2005 21:23:58 +0200 Date: Thu, 21 Apr 2005 21:23:58 +0200 From: Enrico Weigelt To: pgsql-performance@postgresql.org Subject: Re: immutable functions vs. join for lookups ? Message-ID: <20050421192357.GC16548@nibiru.borg.metux.de> Reply-To: weigelt@metux.de Mail-Followup-To: pgsql-performance@postgresql.org References: <6EE64EF3AB31D5448D0007DD34EEB3415C2596@Herge.rcsinc.local> <22219.1113839449@sss.pgh.pa.us> <87u0m4j5p0.fsf@stark.xeocode.com> <25151.1113853826@sss.pgh.pa.us> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <25151.1113853826@sss.pgh.pa.us> 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: 200504/591 X-Sequence-Number: 11988 * Tom Lane wrote: > Yeah, I was actually thinking about a two-step process: inline the > function to produce somethig equivalent to a handwritten scalar > sub-SELECT, and then try to convert sub-SELECTs into joins. ... back to my original question ... What kind of query should I use ? Is a join better than a function ? 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 -- ---------------------------------------------------------------------