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 1ihYGa-00019N-Bj for pgsql-performance@arkaria.postgresql.org; Wed, 18 Dec 2019 12:17: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 1ihYGY-00024v-Vn for pgsql-performance@arkaria.postgresql.org; Wed, 18 Dec 2019 12:17:22 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1ihYGY-00024m-G5 for pgsql-performance@lists.postgresql.org; Wed, 18 Dec 2019 12:17:22 +0000 Received: from mail-wr1-x443.google.com ([2a00:1450:4864:20::443]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1ihYGR-000895-9l for pgsql-performance@lists.postgresql.org; Wed, 18 Dec 2019 12:17:21 +0000 Received: by mail-wr1-x443.google.com with SMTP id z3so2071283wru.3 for ; Wed, 18 Dec 2019 04:17:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cybertec-at.20150623.gappssmtp.com; s=20150623; h=message-id:subject:from:to:cc:date:in-reply-to:references :user-agent:mime-version:content-transfer-encoding; bh=+05iIc1TSaVJHsCpdtlgz9s9TTRo34x3jcITymGbsWM=; b=juPoIc4h+XJ0hizf9vV1as0yZAIMNTfC3lCcaY3fv4FsPt2K0D1uiyZPBVJ3f/sX/Z 7TDjjOI2H6iq5JRsoKp5yPVFTwMu2tFD51Oovx1GA9Hbs3ZF6jLZbpEXpJ4vGWvGjNEI HKO3N4VUmjGVPDqsxsECvCO5FCZMYipJrLVzy4mEIgDiejksQYAcQ4I+oJWMla9KujYK vB91dgOi8Mrddpcy8F2DW71jnHOuZVZU8Gbuge36LZKu9hjx770LkzSH6tfx+1pVtV1+ 20efhJt58n83k1J4hc1pJmcLR1FMJ8wnGLN8cDqI89FvvIaib1LKDanRCA1Dwx43yUNt I2zg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:subject:from:to:cc:date:in-reply-to :references:user-agent:mime-version:content-transfer-encoding; bh=+05iIc1TSaVJHsCpdtlgz9s9TTRo34x3jcITymGbsWM=; b=iGXQWFuk8hpDd0ZQDPLlXc41ktSQJstlnrRrK8v4xV+LpzLvzQKBYhmrh6b7Pj1Sor gTYKjvDcYpnkIOAvPEcsqVbKHaqfCQy7uS5LWj1ods7unp3+nqJlktmQ96Igogi2Fkn4 LBgz8PSP1kfDchgty4Fuf8oJUKsoaB46U4nRRSYAfXNrgYAszpEb5CteeLI7QuH0Y+JG eeWakqRO8zE0LMwTgw2arBF72LojZoCDly9G2Uy/Osj2LZUtG5MxIlhrkgL1tBRTAIuz lO2oXMgVPZS9KeV7lSlJV8F10nC6uS08qfhRfLc7z051qSYMt87JDz4XLzUsWwlvKkuF qOFQ== X-Gm-Message-State: APjAAAU4rku0VlelPUWhT1t2VqdQYKiGUzBFMaZYCjjv1GSRSP+ItXes Q99R6CIMjlDsP8nje+hLJB9YLQ== X-Google-Smtp-Source: APXvYqxW7ffU+2VH17YrYOii2OALt5P6nRThVIjVY2oU8RqLwKeq6/Y/9212qTnqlVwNu1kIdFhoEg== X-Received: by 2002:a5d:514a:: with SMTP id u10mr2451744wrt.169.1576671432452; Wed, 18 Dec 2019 04:17:12 -0800 (PST) Received: from localhost.localdomain (217-149-175-243.nat.highway.telekom.at. [217.149.175.243]) by smtp.gmail.com with ESMTPSA id r5sm2286871wrt.43.2019.12.18.04.17.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Dec 2019 04:17:11 -0800 (PST) Message-ID: <2c41458116a7b80fa8eba117d14fdbd5489c4847.camel@cybertec.at> Subject: Re: Consecutive Query Executions with Increasing Execution Time From: Laurenz Albe To: Jeff Janes Cc: Tom Lane , Peter Geoghegan , Shijia Wei , Pgsql Performance Date: Wed, 18 Dec 2019 13:17:10 +0100 In-Reply-To: References: <19575.1576529417@sss.pgh.pa.us> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.32.5 (3.32.5-1.fc30) MIME-Version: 1.0 Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Tue, 2019-12-17 at 11:11 -0500, Jeff Janes wrote: > On Tue, Dec 17, 2019 at 8:08 AM Laurenz Albe wrote: > > On Mon, 2019-12-16 at 15:50 -0500, Tom Lane wrote: > > > Peter Geoghegan writes: > > > > Why do the first and the twentieth executions of the query have almost > > > > identical "buffers shared/read" numbers? That seems odd. > > > > > > It's repeat execution of the same query, so that doesn't seem odd to me. > > > > Really? Shouldn't the blocks be in shared buffers after a couple > > of executions? > > If it is doing a seq scan (I don't know if it is) they intentionally use a > small ring buffer to, so they evict their own recently used blocks, rather > 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. Yours, Laurenz Albe -- Cybertec | https://www.cybertec-postgresql.com