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 1ihZcm-00056M-Et for pgsql-performance@arkaria.postgresql.org; Wed, 18 Dec 2019 13:44:24 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1ihZck-0004UR-Vp for pgsql-performance@arkaria.postgresql.org; Wed, 18 Dec 2019 13:44:22 +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 1ihZck-0004UK-M7 for pgsql-performance@lists.postgresql.org; Wed, 18 Dec 2019 13:44:22 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ihZci-0000Px-ED for pgsql-performance@lists.postgresql.org; Wed, 18 Dec 2019 13:44:22 +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 xBIDiEQC028393; Wed, 18 Dec 2019 08:44:15 -0500 From: Tom Lane To: Laurenz Albe cc: Jeff Janes , Peter Geoghegan , Shijia Wei , Pgsql Performance Subject: Re: Consecutive Query Executions with Increasing Execution Time In-reply-to: <2c41458116a7b80fa8eba117d14fdbd5489c4847.camel@cybertec.at> References: <19575.1576529417@sss.pgh.pa.us> <2c41458116a7b80fa8eba117d14fdbd5489c4847.camel@cybertec.at> Comments: In-reply-to Laurenz Albe message dated "Wed, 18 Dec 2019 13:17:10 +0100" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <28391.1576676654.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Wed, 18 Dec 2019 08:44:14 -0500 Message-ID: <28392.1576676654@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Laurenz Albe writes: > On Tue, 2019-12-17 at 11:11 -0500, Jeff Janes wrote: >> If it is doing a seq scan (I don't know if it is) they intentionally us= e a >> small ring buffer to, so they evict their own recently used blocks, rat= her >> than evicting other people's blocks. So these blocks won't build up in >> shared_buffers very rapidly just on the basis of repeated seq scans. > Sure, but according to the execution plans it is doing a Parallel Index = Only Scan. Nonetheless, the presented test case consists of repeatedly doing the same query, in a fresh session each time. If there's not other activity then this should reach some sort of steady state. The table is apparently fairly large, so I don't find it surprising that the steady state fails to be 100% cached. regards, tom lane