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

From Tom Lane
Subject Re: pgsql: Consider index-only scans even when there is no matching qual or
Date
Msg-id 3529.1318365938@sss.pgh.pa.us
Whole thread Raw
In response to Re: pgsql: Consider index-only scans even when there is no matching qual or  (Thom Brown <thom@linux.com>)
Responses Re: pgsql: Consider index-only scans even when there is no matching qual or  (Thom Brown <thom@linux.com>)
List pgsql-committers
Thom Brown <thom@linux.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

pgsql-committers by date:

Previous
From: Thom Brown
Date:
Subject: Re: pgsql: Consider index-only scans even when there is no matching qual or
Next
From: Thom Brown
Date:
Subject: Re: pgsql: Consider index-only scans even when there is no matching qual or