Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nwUe9-0003PT-Ii for pgsql-general@arkaria.postgresql.org; Wed, 01 Jun 2022 20:08:49 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nwUe6-0003lL-Rl for pgsql-general@arkaria.postgresql.org; Wed, 01 Jun 2022 20:08:46 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nwUe6-0003lC-Gn for pgsql-general@lists.postgresql.org; Wed, 01 Jun 2022 20:08:46 +0000 Received: from momjian.us ([72.94.173.45]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nwUdz-0005Gj-TW for pgsql-general@postgresql.org; Wed, 01 Jun 2022 20:08:45 +0000 Received: from bruce by momjian.us with local (Exim 4.94.2) (envelope-from ) id 1nwUdy-0002dN-MJ; Wed, 01 Jun 2022 16:08:38 -0400 Date: Wed, 1 Jun 2022 16:08:38 -0400 From: Bruce Momjian To: Danny Shemesh Cc: pgsql-general@postgresql.org Subject: Re: Extended multivariate statistics are ignored (potentially related to high null fraction, not sure) Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Wed, Jun 1, 2022 at 07:28:58PM +0300, Danny Shemesh wrote: > Hey everyone, > > I'm working on improving gathered statistics on several large tables (2TB / > 500M records); > I've created extended stats on correlated columns, ran analyze, compared the > pre and post explains, and it seems as though the extended statistics are > ignored -  > the estimation doesn't change much, and I can accurately derive the est. rows > from multiplying the single-column freqs from pg_stats with the supplied > values. > > > Context: > - pg 12.8 You should be on the most recent version of 12.X, and I do see some extended statistics change in the later releases you are missing. -- Bruce Momjian https://momjian.us EDB https://enterprisedb.com Indecision is a decision. Inaction is an action. Mark Batterson