Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hpD5r-000261-U6 for pgsql-hackers@arkaria.postgresql.org; Sun, 21 Jul 2019 14:45:44 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hpD5p-0003qs-Qj for pgsql-hackers@arkaria.postgresql.org; Sun, 21 Jul 2019 14:45:41 +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_SHA1:256) (Exim 4.89) (envelope-from ) id 1hpD5p-0003ql-I7 for pgsql-hackers@lists.postgresql.org; Sun, 21 Jul 2019 14:45:41 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hpD5o-00048B-7b for pgsql-hackers@lists.postgresql.org; Sun, 21 Jul 2019 14:45:41 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id x6LEjWHP001734; Sun, 21 Jul 2019 10:45:32 -0400 From: Tom Lane To: David Rowley cc: Jesper Pedersen , Andres Freund , Robert Haas , PostgreSQL Hackers Subject: Re: POC: converting Lists into arrays In-reply-to: References: <481.1551390571@sss.pgh.pa.us> <24783.1551568303@sss.pgh.pa.us> <20190303043424.itzy3ge52xrkpmpr@alap3.anarazel.de> <437.1551637744@sss.pgh.pa.us> <12684.1551723095@sss.pgh.pa.us> <20190304190612.vgqqsowzkrh22623@alap3.anarazel.de> <26464.1551734920@sss.pgh.pa.us> <20190304221101.hdg4vj5fo4eewh3b@alap3.anarazel.de> <20190304235402.nod3gbotk2qtd4nh@alap3.anarazel.de> <1131.1551746172@sss.pgh.pa.us> <14626.1558745627@sss.pgh.pa.us> <29297.1558799327@sss.pgh.pa.us> <25178.1562006685@sss.pgh.pa.us> <25258.1562023641@sss.pgh.pa.us> <2305.1562181615@sss.pgh.pa.us> <21272.1563318411@sss.pgh.pa.us> Comments: In-reply-to David Rowley message dated "Mon, 22 Jul 2019 01:32:00 +1200" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1732.1563720332.1@sss.pgh.pa.us> Date: Sun, 21 Jul 2019 10:45:32 -0400 Message-ID: <1733.1563720332@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk David Rowley writes: > On Wed, 17 Jul 2019 at 11:06, Tom Lane wrote: >> (Actually, I doubt that any of these changes will really move the >> performance needle in the real world. It's more a case of wanting >> the code to present good examples not bad ones.) > In spirit with the above, I'd quite like to fix a small bad example > that I ended up with in nodeAppend.c and nodeMergeappend.c for > run-time partition pruning. I didn't test the patch, but just by eyeball it looks sane, and I concur it should win if the bitmap is sparse. One small question is whether it loses if most of the subplans are present in the bitmap. I imagine that would be close enough to break-even, but it might be worth trying to test to be sure. (I'd think about breaking out just the loops in question and testing them stand-alone, or else putting in an outer loop to repeat them, since as you say the surrounding work probably dominates.) regards, tom lane