Re: BUG #15618: Duplicating a join clause breaks index use

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: cdalxndr(at)yahoo(dot)com, pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #15618: Duplicating a join clause breaks index use
Date: 2019-02-01 18:25:06
Message-ID: CAFj8pRAFqKsQcyLfrzm2NAfuEvDMk8mV+6TsxF5UrhGKgv2opg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

pá 1. 2. 2019 v 19:03 odesílatel PG Bug reporting form <
noreply(at)postgresql(dot)org> napsal:

> The following bug has been logged on the website:
>
> Bug reference: 15618
> Logged by: cd a
> Email address: cdalxndr(at)yahoo(dot)com
> PostgreSQL version: 10.3
> Operating system: Windows 10
> Description:
>
> Adding a unused join clause to the query, modifies the run time from 50ms
> to
> 4seconds.
> No columns from the join clause are returned and the joined table is not
> used in other places.
> The join clause is a duplicate of another one that is used for further
> joining.
>
> The joined clause should have been automatically removed as it has no side
> effects, thus using indices and optimizing query runtime.
>

Please, can you send a example. Generally, you can remove only some outer
join clauses. unused inner join cannot be removed, because it can has
impact on result.

Regards

Pavel Stehule

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Michael Paquier 2019-02-02 01:08:18 Re: FATAL: terminating walreceiver process due to administrator command
Previous Message PG Bug reporting form 2019-02-01 17:38:39 BUG #15618: Duplicating a join clause breaks index use