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

From: Thom Brown <thom(at)linux(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
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:56:07
Message-ID: CAA-aLv5zAZsuefLPf__8PFfD3peyB+f=AsuMEAoH8UnWpDuRqA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

On 11 October 2011 21:45, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> 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.

Ah okay, understood.

--
Thom Brown
Twitter: @darkixion
IRC (freenode): dark_ixion
Registered Linux user: #516935

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Browse pgsql-committers by date

  From Date Subject
Next Message Bruce Momjian 2011-10-11 21:33:54 pgsql: Document that not backing up postmaster.pid and postmaster.opts
Previous Message Tom Lane 2011-10-11 20:45:38 Re: pgsql: Consider index-only scans even when there is no matching qual or