| From: | "Daniel Westermann (DWE)" <daniel(dot)westermann(at)dbi-services(dot)com> |
|---|---|
| To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
| Cc: | "pgsql-performance(at)lists(dot)postgresql(dot)org" <pgsql-performance(at)lists(dot)postgresql(dot)org> |
| Subject: | Re: Strange behavior once statistics are there |
| Date: | 2021-04-16 06:14:42 |
| Message-ID: | GV0P278MB0483B5849A03A3FBDCCFC7F5D24C9@GV0P278MB0483.CHEP278.PROD.OUTLOOK.COM |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-performance |
From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Sent: Thursday, April 15, 2021 17:00
To: Daniel Westermann (DWE) <daniel(dot)westermann(at)dbi-services(dot)com>
Cc: pgsql-performance(at)lists(dot)postgresql(dot)org <pgsql-performance(at)lists(dot)postgresql(dot)org>
Subject: Re: Strange behavior once statistics are there
>I'd suggest trying to flatten these to be regular joins, ie
>try to bring up persons6_ and stufen7_ into the main JOIN nest.
>It looks like persons6_.pes_id might be unique, meaning that you
>don't really need the IN behavior in the first case so flattening
>it should be straightforward. The other one is visibly not unique,
>but since you're using "select distinct" at the top level anyway,
>getting duplicate rows might not be a problem (unless there are
>a lot of duplicates?)
Thank you, Tom
| From | Date | Subject | |
|---|---|---|---|
| Next Message | mustafa.pekgoz | 2021-04-16 10:32:56 | OLEDB for PostgreSQL |
| Previous Message | Tomas Vondra | 2021-04-16 04:52:04 | Re: Disabling options lowers the estimated cost of a query |