Re: Bad query plan when you add many OR conditions

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Marco Colli <collimarco91(at)gmail(dot)com>
Cc: Justin Pryzby <pryzby(at)telsasoft(dot)com>, pgsql-performance(at)lists(dot)postgresql(dot)org
Subject: Re: Bad query plan when you add many OR conditions
Date: 2020-01-10 15:18:02
Message-ID: 28696.1578669482@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Marco Colli <collimarco91(at)gmail(dot)com> writes:
> As you can see it is a *index scan* and not an *index only* scan... I don't
> understand why. The index includes all the fields used by the query... so
> an index only scan should be possible.

Huh? The query is "select * from ...", so it retrieves *all* columns
of the table.

regards, tom lane

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Marco Colli 2020-01-10 16:03:41 Re: Bad query plan when you add many OR conditions
Previous Message Marco Colli 2020-01-10 14:53:22 Re: Bad query plan when you add many OR conditions