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 1kqi4t-0001Ui-87 for pgsql-hackers@arkaria.postgresql.org; Sat, 19 Dec 2020 19:39:43 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kqi4p-0004ZO-9Q for pgsql-hackers@arkaria.postgresql.org; Sat, 19 Dec 2020 19:39:39 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kqi4o-0004ZH-VH for pgsql-hackers@lists.postgresql.org; Sat, 19 Dec 2020 19:39:39 +0000 Received: from mail-io1-xd30.google.com ([2607:f8b0:4864:20::d30]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1kqi4h-0003m3-Ow for pgsql-hackers@postgresql.org; Sat, 19 Dec 2020 19:39:38 +0000 Received: by mail-io1-xd30.google.com with SMTP id d9so5282739iob.6 for ; Sat, 19 Dec 2020 11:39:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telsasoft-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :content-transfer-encoding:user-agent; bh=JPIJ9TUhN1d9kjQG1N6xaCyOq1V3RniZyq034fbcl4s=; b=ED2E6JlSZJxSvjEDa1BhQyL697HtKaqP0CVNC8qMRTfO1GNabCGhpQGp0MdtkdXPo9 SrUebpjOuBZ8lZ7qMMxksPYuRn+t1toYH+P6m2Uxa6WDNqBBqfFQVAcTboo/y2+/3kp+ bECQIZBZmuUd1Zdr21+JBoo0go1OXN3xOkKo/OKj1NomhBvN9d+ObfGY0PfT5zbje9LG 9DKCA/qdLt6WbGjvRyfqVxzhFfan3oNSiZ0cXGGl5XVrHPZqhMJOH2yAA2MGKdzyJfht q4BLFBNj58bmJHUmhRQUTrU8xdHssv+WW4pCcomp+Kj2GKCOhI9ee5B1Uin6evCkajEl TmOA== 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:mime-version :content-disposition:content-transfer-encoding:user-agent; bh=JPIJ9TUhN1d9kjQG1N6xaCyOq1V3RniZyq034fbcl4s=; b=EhCBlodTY3EfW4OYAFTSYaTJGS9qqbV3zpczDmbxzFM7zefOgikIXNZo20Cp4h81bO 2fBTZ2M3EQS4dM3S4bgzWpiQX5r2DA6CYJqyP5GOyqZSD9APgavxBIm2RrbtzfKT8Gss y7VPTlLCh/pFadTW72+X66xW8vidUEfqvJC2lN5YdWuVI6jW1qqLHV3Tp8EcileXUdss sgaKquPW7SZoFnjTzVInAXd/OI38Nzc+LIyL+03KLO3axropHUK34ohMnXytFJb3UZp8 GD9rBMKo3EAaDkndEjV+mwpZL/SL6I2YJYLe/kUekfgOS8aodkzi8MtZkO07Uk8WQPYv aQHQ== X-Gm-Message-State: AOAM530u3RTPVzqiXd1CEyWX8DZPBsMY/SZn4LOosX0lFbtF0zOFiqXo +MdKwB/L5XIfBxnXotN6Js8MXtpxrRnKvy+9 X-Google-Smtp-Source: ABdhPJwVj1e4874fJq39deCWhuFd+dEoKqzZnGl3uP8IXGcUo0+4ydgycMXXAZOne5iuZQ2RWx8JuA== X-Received: by 2002:a6b:2c52:: with SMTP id s79mr8955688ios.53.1608406769854; Sat, 19 Dec 2020 11:39:29 -0800 (PST) Received: from pryzbyj.telsasoft (charmander.telsasoft.com. [50.244.222.1]) by smtp.gmail.com with ESMTPSA id t1sm9264562ile.1.2020.12.19.11.39.28 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sat, 19 Dec 2020 11:39:29 -0800 (PST) Received: by pryzbyj.telsasoft (Postfix, from userid 1000) id 0C41F80102D; Sat, 19 Dec 2020 13:39:27 -0600 (CST) Date: Sat, 19 Dec 2020 13:39:27 -0600 From: Justin Pryzby To: pgsql-hackers@postgresql.org Cc: Tomas Vondra , Bruce Momjian Subject: v10 release notes for extended stats Message-ID: <20201219193927.GD30237@telsasoft.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit User-Agent: Mutt/1.9.4 (2018-02-28) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk 2017-03-24 [7b504eb28] Implement multivariate n-distinct coefficients 2017-04-05 [2686ee1b7] Collect and use multi-column dependency stats 2017-05-12 [bc085205c] Change CREATE STATISTICS syntax The existing notes say: |Add multi-column optimizer statistics to compute the correlation ratio and number of distinct values (Tomas Vondra, David Rowley, Álvaro Herrera) |New commands are CREATE STATISTICS, ALTER STATISTICS, and DROP STATISTICS. |This feature is helpful in estimating query memory usage and when combining the statistics from individual columns. "correlation ratio" is referring to stxkind=d (dependencies), right ? That's very unclear. "helpful in estimating query memory usage": I guess it means that this allows the planner to correctly account for large vs small number of GROUP BY values, but it sounds more like it's going to help a user to estimate memory use. "when combining the statistics from individual columns." this is referring to stxkind=d, handling correlated/redundant clauses, but it'd be hard for a user to know that. Also, maybe it should say "combining stats from columns OF THE SAME TABLE". So I propose: |Allow creation of multi-column statistics objects, for computing the |dependencies between columns and number of distinct values of combinations of columns |(Tomas Vondra, |David Rowley, Álvaro Herrera) |The new commands are CREATE STATISTICS, ALTER STATISTICS, and DROP STATISTICS. |Improved statistics allow the planner to generate better query plans with more accurate |estimates of the row count and memory usage when grouping by multiple |columns, and more accurate estimates of the row count if WHERE clauses apply |to multiple columns and values of some columns are correlated with values of |other columns.