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 9344E53A28 for ; Wed, 20 Apr 2005 05:35:57 -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 89236-02 for ; Wed, 20 Apr 2005 08:35:52 +0000 (GMT) Received: from zproxy.gmail.com (zproxy.gmail.com [64.233.162.204]) by svr1.postgresql.org (Postfix) with ESMTP id E43BA53AAD for ; Wed, 20 Apr 2005 05:35:47 -0300 (ADT) Received: by zproxy.gmail.com with SMTP id 34so138189nzf for ; Wed, 20 Apr 2005 01:35:48 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=NRZ+3wbTmkx/0Otp+rmn8zsgv9pO3S8ME4H+mP5o6voKtSqwdzXpAF1Yx4rKWYe7ehNl6qq0BEaebetFEewPnFv54KJ8egYz4QB3EYQOhtj7iRyHc19N1NN67NuCSyO4TFTCU1q0zM4uJFQg3qeDjnUn530wAtNvdFQTQW7QWZ8= Received: by 10.36.61.11 with SMTP id j11mr59976nza; Wed, 20 Apr 2005 01:35:48 -0700 (PDT) Received: by 10.36.22.15 with HTTP; Wed, 20 Apr 2005 01:35:48 -0700 (PDT) Message-ID: <758d5e7f0504200135367d56d5@mail.gmail.com> Date: Wed, 20 Apr 2005 10:35:48 +0200 From: Dawid Kuroczko Reply-To: Dawid Kuroczko To: pgsql-performance@postgresql.org Subject: Re: immutable functions vs. join for lookups ? In-Reply-To: <20050420003054.GV58835@decibel.org> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <6EE64EF3AB31D5448D0007DD34EEB3415C2596@Herge.rcsinc.local> <758d5e7f05041807194a78b55a@mail.gmail.com> <20050420003054.GV58835@decibel.org> X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.761 tagged_above=0 required=5 tests=AWL, DNS_FROM_RFC_ABUSE, FROM_ENDS_IN_NUMS, RCVD_BY_IP X-Spam-Level: X-Archive-Number: 200504/493 X-Sequence-Number: 11890 On 4/20/05, Jim C. Nasby wrote: > You should re-run the function test using SQL as the function language > instead of plpgsql. There might be some performance to be had there. Yay! You're right! I wonder why have I forgotten about LANGUAGE SQL. :) It's 30 seconds vs 5 seconds for CASE ... END insisde PLpgsql vs CASE...END LANGUAGE SQL. :) I.e. its almost the same as in-place entered SQL. Regards, Dawid