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 1hwDTv-0007Rq-S6 for pgsql-hackers@arkaria.postgresql.org; Fri, 09 Aug 2019 22:35:32 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hwDTt-0004nZ-FW for pgsql-hackers@arkaria.postgresql.org; Fri, 09 Aug 2019 22:35:29 +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 1hwDTt-0004nQ-1Z for pgsql-hackers@lists.postgresql.org; Fri, 09 Aug 2019 22:35:29 +0000 Received: from mail-qt1-x841.google.com ([2607:f8b0:4864:20::841]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hwDTq-0002tM-1U for pgsql-hackers@lists.postgresql.org; Fri, 09 Aug 2019 22:35:28 +0000 Received: by mail-qt1-x841.google.com with SMTP id k13so89963qtm.12 for ; Fri, 09 Aug 2019 15:35:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=x2T/pRT+41XuSBoMz8v18c49O5sI7DAFpA5siL3pqnY=; b=hn+P7bSKAWZQNpNaiBEqhumU1Yfx7vgga6AEh12iOLpbURRsX96U2TMyWhDMAXY/6M 11RunrDaWEz+gEwbfN3fItaH7DbqYg7vNVYmBvcaQwuBeyrvms8frr3fD0NJ/UxZCm7Q WGxdsreIZTemnAXqNgdx7KUKBHz+LzNFPZcz4nUYH1ehYkuEDNeqtX0Wyf/mdYAQSZeb ZG9yKl5AUBAWRAHsFCOI+2Zl9Ex8bHMl64qzcn+O1DqcyVrgXcHcoDle6CsWG3mxLZye WYfdEPfrk+KDwZ6h6IcJOJFj1ICxI7Xd8ZDZNZVCqPQwJw1oj9qflCllIoLwnoMkRFyU iPzA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=x2T/pRT+41XuSBoMz8v18c49O5sI7DAFpA5siL3pqnY=; b=Xykeq32HcC+SjJA4ZFEj4nyigt/t9GEkSe+dbUNhPH3QBvq0quyYjoAXVoR2+4Dj4u DBAMrkSig2e7zmcZBjjrKQe9r1NlbCzmAr5UZVdb0Ou1AVBPgEpdVySQHqD+6DsQUJEW Eh6/StVTkU0hRmEbYjx6rUzzhyKJq4gVuk1syNrqW/4IQ4y5OaXNbJdHr2Mb+ty1SDVe 9/aUfT2wYtMcOaoXpbFV4oRQdxiCe7vqxv4CQZ3ba+Ih+kMbFJR1iCQ5Z2kvoHSLsZp3 qBErfFR9m2Xs2FEkyynhyhSIrzEljJHhbjrgPyLVkoDwsNdDsDNHkiNkiy5uk6ZIIa2t kmqA== X-Gm-Message-State: APjAAAU0dSihjGHgjcP7Ee9ISEZlq61xAuCkvFupmowjEDfIAeCpk96J 7omhFjsHvi7wZO2wNhs+yHvRtg== X-Google-Smtp-Source: APXvYqy9qYjoQFND6FD9h2WLNHZ8hWJQ1sVmJpi+k4cVi3OcjgLC5lOxjiIU3DA8KlzQ4uAlgGrsyQ== X-Received: by 2002:ac8:6786:: with SMTP id b6mr17756630qtp.17.1565390123845; Fri, 09 Aug 2019 15:35:23 -0700 (PDT) Received: from nimloth.alvh.no-ip.org ([190.121.29.3]) by smtp.gmail.com with ESMTPSA id q62sm374702qkb.69.2019.08.09.15.35.23 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Fri, 09 Aug 2019 15:35:23 -0700 (PDT) Received: by nimloth.alvh.no-ip.org (Postfix, from userid 1000) id 3CEA3120E34; Fri, 9 Aug 2019 18:35:20 -0400 (-04) Date: Fri, 9 Aug 2019 18:35:20 -0400 From: Alvaro Herrera To: Tom Lane Cc: David Rowley , Jesper Pedersen , Andres Freund , Robert Haas , PostgreSQL Hackers Subject: Re: POC: converting Lists into arrays Message-ID: <20190809223520.GA28783@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <14960.1565384592@sss.pgh.pa.us> User-Agent: Mutt/1.9.4 (2018-02-28) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 2019-Aug-09, Tom Lane wrote: > I poked at this, and attached is a patch, but again I'm not seeing > that there's any real performance-based argument for it. So far > as I can tell, if we've got a lot of RTEs in an executable plan, > the bulk of the startup time is going into lock (re) acquisition in > AcquirePlannerLocks, and/or permissions scanning in ExecCheckRTPerms; > both of those have to do work for every RTE including ones that > run-time pruning drops later on. ExecInitRangeTable just isn't on > the radar. I'm confused. I thought that the point of doing this wasn't that we wanted to improve performance, but rather that we're now able to remove the array without *losing* performance. I mean, those arrays were there to improve performance for code that wanted fast access to specific list items, but now we have fast access to the list items without it. So a measurement that finds no performance difference is good news, and we can get rid of the now-pointless optimization ... -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services