Re: [HACKERS] Perfomance bug in v10 - Mailing list pgsql-hackers

From David Rowley
Subject Re: [HACKERS] Perfomance bug in v10
Date
Msg-id CAKJS1f9hPst0+h6Ert09nSh8aWcYOwkYS-Gar7T8UGPxaq4dQA@mail.gmail.com
Whole thread Raw
In response to Re: [HACKERS] Perfomance bug in v10  (Teodor Sigaev <teodor@sigaev.ru>)
List pgsql-hackers
On 2 June 2017 at 03:46, Teodor Sigaev <teodor@sigaev.ru> wrote:
> I miss here why could the presence of index influence on that? removing
> index causes a good plan although it isn't used in both plans .

Unique indexes are used as proofs when deciding if a join to the
relation is "inner_unique". A nested loop unique join is costed more
cheaply than a non-unique one since we can skip to the next outer
tuple once we've matched the current outer tuple to an inner tuple. In
theory that's half as many comparisons for a non-parameterised nested
loop.


-- David Rowley                   http://www.2ndQuadrant.com/PostgreSQL Development, 24x7 Support, Training & Services



pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: [HACKERS] logical replication and PANIC during shutdowncheckpoint in publisher
Next
From: Andres Freund
Date:
Subject: Re: [HACKERS] logical replication and PANIC during shutdowncheckpoint in publisher