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

2023-06-21 Thread David Rowley
On Tue, 13 Jun 2023 at 23:29, Pavel Stehule wrote: >> I think it's probably worth adjusting the docs to mention this. It >> seems like it might be something that could surprise someone. >> >> Something like the attached, maybe? > > +1 Ok, I pushed that patch. Thanks. David

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

2023-06-13 Thread James Pang (chaolpan)
: PostgreSQL Developers ; James Pang (chaolpan) Subject: Re: extended statistics n-distinct on multiple columns not used when join two tables út 13. 6. 2023 v 13:26 odesílatel David Rowley mailto:dgrowle...@gmail.com>> napsal: (moving to -hackers) On Tue, 13 Jun 2023 at 21:30, Pavel S

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

2023-06-13 Thread Pavel Stehule
út 13. 6. 2023 v 13:26 odesílatel David Rowley napsal: > (moving to -hackers) > > On Tue, 13 Jun 2023 at 21:30, Pavel Stehule > wrote: > > út 13. 6. 2023 v 11:21 odesílatel James Pang (chaolpan) < > chaol...@cisco.com> napsal: > >> When join two table on multiple columns equaljoin, rows est

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

2023-06-13 Thread David Rowley
(moving to -hackers) On Tue, 13 Jun 2023 at 21:30, Pavel Stehule wrote: > út 13. 6. 2023 v 11:21 odesílatel James Pang (chaolpan) > napsal: >> When join two table on multiple columns equaljoin, rows estimation >> always use selectivity = multiplied by distinct multiple individual columns,