From: | Andy Fan <zhihui(dot)fan1213(at)gmail(dot)com> |
---|---|
To: | PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: [PATCH] Erase the distinctClause if the result is unique by definition |
Date: | 2020-02-06 06:01:27 |
Message-ID: | CAKU4AWqi8_N+13+msrDOK1HZhLppSY0RN9gxESYFKzjKmX4E1w@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
update the patch with considering the semi/anti join.
Can anyone help to review this patch?
Thanks
On Fri, Jan 31, 2020 at 8:39 PM Andy Fan <zhihui(dot)fan1213(at)gmail(dot)com> wrote:
> Hi:
>
> I wrote a patch to erase the distinctClause if the result is unique by
> definition, I find this because a user switch this code from oracle
> to PG and find the performance is bad due to this, so I adapt pg for
> this as well.
>
> This patch doesn't work for a well-written SQL, but some drawback
> of a SQL may be not very obvious, since the cost of checking is pretty
> low as well, so I think it would be ok to add..
>
> Please see the patch for details.
>
> Thank you.
>
Attachment | Content-Type | Size |
---|---|---|
0001-Erase-the-distinctClause-if-the-result-is-unique-by-.patch | application/octet-stream | 27.7 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Kasahara Tatsuhito | 2020-02-06 06:04:58 | Re: Tid scan increments value of pg_stat_all_tables.seq_scan. (but not seq_tup_read) |
Previous Message | Andres Freund | 2020-02-06 05:55:31 | Re: In PG12, query with float calculations is slower than PG11 |