extended statistics n-distinct on multiple columns not used when join two tables

James Pang (chaolpan) <chaolpan@cisco.com>

From: "James Pang (chaolpan)" <chaolpan@cisco.com>
To: "pgsql-performance@lists.postgresql.org" <pgsql-performance@lists.postgresql.org>
Date: 2023-06-13T09:21:25Z
Lists: pgsql-hackers, pgsql-performance

Attachments

Hi,
     When join two table on multiple columns equaljoin, rows estimation always use selectivity = multiplied by distinct multiple individual columns, possible to use  extended n-distinct statistics on multiple columns?
    PG v14.8-1, attached please check test case with details.

Thanks,

James

Commits

  1. Doc: mention that extended stats aren't used for joins