Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1c2mxR-0001qL-Dk for pgsql-hackers@arkaria.postgresql.org; Fri, 04 Nov 2016 22:27:33 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1c2mxQ-0002sa-SI for pgsql-hackers@arkaria.postgresql.org; Fri, 04 Nov 2016 22:27:32 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1c2mw2-0001KT-7i for pgsql-hackers@postgresql.org; Fri, 04 Nov 2016 22:26:06 +0000 Received: from mail-pf0-x22d.google.com ([2607:f8b0:400e:c00::22d]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1c2mvz-0005lD-1f for pgsql-hackers@postgresql.org; Fri, 04 Nov 2016 22:26:05 +0000 Received: by mail-pf0-x22d.google.com with SMTP id n85so58444885pfi.1 for ; Fri, 04 Nov 2016 15:26:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:subject:to:references:message-id:date:user-agent:mime-version :in-reply-to:content-transfer-encoding; bh=60GSZH/FyfRm08Omb3hR8TLS7BZvdWbt+y/QAf8BBqw=; b=o39NMQ2gDUYCMrg+OsSU+Xhl7KQ2hcjllKDrmRCYAVms3qgpKD+v/0JURfoQ6GicBh 7R1o6svgVodDR/Dl3RY3l5mVTs1w0DbQHli3m/SnHqpgDz6UEOWrUJ687wbgmz6umndB UUB8ElCiTguPrPtlaZUjTeIS/Vj+yb4D8tS2TN/sC4G8psrWWngviFb9Y19JrBtmqSdG JeZOpA2KnqdPuY9c2tDLB6R0U5mprVW1nF3epi4YbgDnTvitTgqfCy52vCQ/AOLCFQ4Z c5h5lZ7F+Menkyh+JXroSt/hUAlzPifeoyQaqKgVWaY938HAmmCwUY8AgWuriVrtDnU1 V+YQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:subject:to:references:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=60GSZH/FyfRm08Omb3hR8TLS7BZvdWbt+y/QAf8BBqw=; b=W2W6iEd6wzj65pKWtxC/f7dtjgwNR5HqeQQb0jWbJxrLOmkyR0bflPDFdX46FMRtWt e7fjElk3hon+rbq+1GvOMeqSQtGyfRusJjmRdpq1rV3m7uJDKoaYcky0Wi0aoicyAVwY EFM8Wnv/kwzpIADuEJbX5Og4WSB5g88mRrmsZneQ/uU+CtW++poo0zmgWyarsFAJNxTv +kODyeQZX7DPDCqO53xU1fSuO2U+6ZnqD2+/QzEUUoc8o84ZHbPy6XAQ02F+9vGV0z9s VNmG4TOW5sVaGLHRKdEYgR1knSD2btsTchfi2zaidoI+/fAqO3D3+dAj+lEMvIgy5v0a CdQA== X-Gm-Message-State: ABUngvdS2NZKxBeH/DOOcZu3wWW1xLcrNuBZFA0gls5m0DMyH4I/rprYuTXTzoIZbsqMZg== X-Received: by 10.98.25.205 with SMTP id 196mr30928718pfz.46.1478298359899; Fri, 04 Nov 2016 15:25:59 -0700 (PDT) Received: from [10.0.49.98] ([204.14.239.74]) by smtp.gmail.com with ESMTPSA id n2sm22605131pfa.75.2016.11.04.15.25.59 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 04 Nov 2016 15:25:59 -0700 (PDT) From: Doug Doole X-Google-Original-From: Doug Doole Subject: Re: Improving executor performance To: pgsql-hackers@postgresql.org References: <20160624232953.beub22r6yqux4gcp@alap3.anarazel.de> <20160714011850.bd5zhu35szle3n3c@alap3.anarazel.de> Message-ID: Date: Fri, 4 Nov 2016 15:25:58 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: <20160714011850.bd5zhu35szle3n3c@alap3.anarazel.de> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -2.7 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org On 07/13/2016 06:18 PM, Andres Freund wrote: > Attached (in patch 0003) is a proof-of-concept implementing an > expression evalution framework that doesn't use recursion. Instead > ExecInitExpr2 computes a number of 'steps' necessary to compute an > expression. These steps are stored in a linear array, and executed one > after another (save boolean expressions, which can jump to later steps). > E.g. to compute colname = 1 the steps are 1) fetch var, 2) evaluate > const, 3) call function. We've been having trouble with the performance of simple expressions in PLpgSQL so I started playing with this patch. (No sense re-inventing the wheel after all.) It was straightforward to extend to simple expressions and showed an immediate improvement (~10% faster on a simple test). Running in our full environment highlighted a few areas that I think are worth more investigation. However, before I tackle that, is the posted proof-of-concept still the latest and greatest? If not, any chance of getting the latest? Going forward, I'd like to collaborate on our efforts if you're interested. - Doug Doole Salesforce -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers