Re: pgsql: Consider index-only scans even when there is no matching qual or

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Thom Brown <thom(at)linux(dot)com>
Cc: Bruce Momjian <bruce(at)momjian(dot)us>, pgsql-committers(at)postgresql(dot)org
Subject: Re: pgsql: Consider index-only scans even when there is no matching qual or
Date: 2011-10-11 20:45:38
Message-ID: 3529.1318365938@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Thom Brown <thom(at)linux(dot)com> writes:
> So an index-only scan is 30 times slower in this particular test case.

Don't see why you'd find that unexpected. If you have to visit all the
rows, a seqscan is usually going to be the best way. An indexscan only
has a chance of winning when the index is much smaller than the table,
which isn't the case in your example, even if you hadn't seen to it that
the index wasn't particularly nicely physically ordered.

regards, tom lane

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Thom Brown 2011-10-11 20:56:07 Re: pgsql: Consider index-only scans even when there is no matching qual or
Previous Message Thom Brown 2011-10-11 20:36:45 Re: pgsql: Consider index-only scans even when there is no matching qual or