From 4e17cb00dc2b57f0ac1bbe3c1fd587e982b33307 Mon Sep 17 00:00:00 2001 From: David Rowley Date: Thu, 22 Jun 2023 12:47:15 +1200 Subject: [PATCH] Doc: mention that extended stats aren't used for joins Statistics defined by the CREATE STATISTICS command are only used to assist with the selectivity estimations of base relations, never for joins. Here we mention this fact in the notes section of the CREATE STATISTICS command. Discussion: https://postgr.es/m/CAApHDvrMuVgDOrmg_EtFDZ=AOovq6EsJNnHH1ddyZ8EqL4yzMw@mail.gmail.com Backpatch-through: 11 --- doc/src/sgml/ref/create_statistics.sgml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/doc/src/sgml/ref/create_statistics.sgml b/doc/src/sgml/ref/create_statistics.sgml index e3e5c297ddb..a145c41f04b 100644 --- a/doc/src/sgml/ref/create_statistics.sgml +++ b/doc/src/sgml/ref/create_statistics.sgml @@ -167,6 +167,12 @@ CREATE STATISTICS [ IF NOT EXISTS ] statistics_na maintenance. Expression statistics are built automatically for each expression in the statistics object definition. + + + Extended statistics are not currently used by the planner for selectivity + estimations made for table joins. This limitation will likely be removed + in a future version of PostgreSQL. +