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 1iyK2U-0005lL-Nw for pgsql-performance@arkaria.postgresql.org; Sun, 02 Feb 2020 18:32:10 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1iyK2S-0002Rm-Qx for pgsql-performance@arkaria.postgresql.org; Sun, 02 Feb 2020 18:32:08 +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 1iyK2S-0002Re-Hd for pgsql-performance@lists.postgresql.org; Sun, 02 Feb 2020 18:32:08 +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 1iyK2P-0007Kp-T5 for pgsql-performance@lists.postgresql.org; Sun, 02 Feb 2020 18:32:08 +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 012IW2BR021163; Sun, 2 Feb 2020 13:32:02 -0500 From: Tom Lane To: Marco Colli cc: pgsql-performance@lists.postgresql.org Subject: Re: Statistics on array values In-reply-to: References: <2661.1580663465@sss.pgh.pa.us> Comments: In-reply-to Marco Colli message dated "Sun, 02 Feb 2020 19:26:19 +0100" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <21161.1580668322.1@sss.pgh.pa.us> Date: Sun, 02 Feb 2020 13:32:02 -0500 Message-ID: <21162.1580668322@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Marco Colli writes: > Unfortunately I don't get actual improvements. I use PG 11 and I run the > following commands: > ALTER TABLE subscriptions ALTER tags SET STATISTICS 1000; > ANALYZE subscriptions; > However the bias remains pretty much the same (slightly worse after). Any > idea? So what have you got in the pg_stats fields I asked about? How big is this table anyway (how many rows, how many different tag values)? regards, tom lane