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 1ir70O-0001AN-3B for pgsql-performance@arkaria.postgresql.org; Mon, 13 Jan 2020 21:12:12 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1ir70L-0007hT-8F for pgsql-performance@arkaria.postgresql.org; Mon, 13 Jan 2020 21:12:09 +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 1ir70K-0007hM-OP for pgsql-performance@lists.postgresql.org; Mon, 13 Jan 2020 21:12:08 +0000 Received: from mail-wr1-x442.google.com ([2a00:1450:4864:20::442]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1ir70D-0001o7-QF for pgsql-performance@postgresql.org; Mon, 13 Jan 2020 21:12:07 +0000 Received: by mail-wr1-x442.google.com with SMTP id w15so10150501wru.4 for ; Mon, 13 Jan 2020 13:12:01 -0800 (PST) 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:references:mime-version :content-disposition:in-reply-to; bh=In3H+tyTDNsKThGR4tAMJM6H9fv4cy9gvrfsFoxUAG4=; b=PSS4wdjGRjEvCqmHA9t45vikvzVo33fPhCYR6h5i31x2vxqqrkUUZUwTItiUVGWOSN SE4M4fBwenAm6gc8ZhxhcWz1jmM+hnhM89BPUJhoryOoUduIxsBvZPZcCeT1Zgi/FHt+ g1E2IKcsz78WwVQd07VeSd5aGu6U1IYkYpDButBMTLoe43g5u3Z3EO7UIDWmyxxGOs84 zpXGCfHFGlzw+b8tawY1105BIYpd6FGXu8CLo/Mev/dcMftEmB+iYggNaTnzlx/MSMny TL+1PpHQD+EflRIIAFWtaGVRfY65xp1Z9pc8OXXk4nU4DzcHrM6ZxTH+cdW6r5f4eYPs RGsg== 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:references :mime-version:content-disposition:in-reply-to; bh=In3H+tyTDNsKThGR4tAMJM6H9fv4cy9gvrfsFoxUAG4=; b=NPvLOED4XpBASg6Ama8RzcAp96vQOBVHE8kKkXZSjWpP3OWqxBv6fEndhlzjYDu5bu bxbu/Tn/r7AL33c5PeMak7CZLkDFUtA2pmNz2teOPpeo5VAu5A+or5z9sdiYeTpFJpVv n+J4RjoMY7w/szawh1O3r5O44to1WeU6U7DKmqkaKvIYLnPX2XdmY7Kn3HVkNWiJ5VfI /9fpNSdWe9CBww/Yoi8wNt+Z/aWpsI+qfYryeqmopteVwfZleP4HqP/6ck0NxYFtAPHe +IMXFkxN8p82lIRLw9XTHEpCEzoFqXn6/3iuTslyrTZ3/Eeq26eGHNU7MGUvV5y3bYOe dbpA== X-Gm-Message-State: APjAAAWRAC5pCrYUexpZOqp5+Uodiocl2Nqkpvl5pNM7Jok9B1bBQCp4 /4Fv/c56smneVGISIBWQk8BGNQ== X-Google-Smtp-Source: APXvYqzfe2szeZykL0qgKsrVgyTWR/GI4nvYHaOqRO2otQkX3CTL85fmAUU6zfUbd4z/oBKnkSWCOA== X-Received: by 2002:adf:9144:: with SMTP id j62mr19885012wrj.168.1578949920320; Mon, 13 Jan 2020 13:12:00 -0800 (PST) Received: from localhost (ip-86-49-253-92.net.upcbroadband.cz. [86.49.253.92]) by smtp.gmail.com with ESMTPSA id s16sm16648011wrn.78.2020.01.13.13.11.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Jan 2020 13:11:58 -0800 (PST) Date: Mon, 13 Jan 2020 22:11:56 +0100 From: Tomas Vondra To: Shira Bezalel Cc: Michael Lewis , Justin Pryzby , postgres performance list Subject: Re: Seeking reason behind performance gain in 12 with HashAggregate Message-ID: <20200113211156.ubllzwzisdyljox5@development> References: <20200113164220.GH26045@telsasoft.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Mon, Jan 13, 2020 at 12:44:14PM -0800, Shira Bezalel wrote: >Hi Michael, > >I appreciate your question. I ran a vacuum analyze on the 9.6 table and it >yielded no difference. Same number of buffers were read, same query plan. > VACUUM ANALYZE won't shrink the table - the number of buffers will be exactly the same. You need to do VACUUM FULL, but be careful as that acquires exclusive lock on the table. regards -- Tomas Vondra http://www.2ndQuadrant.com PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services