Re: BUG #5113: Postgres not scanning indexes

From: Michael Glaesemann <grzm(at)seespotcode(dot)net>
To: "dan" <dan(dot)boeriu(at)roost(dot)com>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #5113: Postgres not scanning indexes
Date: 2009-10-13 23:44:02
Message-ID: E337CBD9-6709-40C3-9F27-2D44C0B0A57B@seespotcode.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs


On Oct 13, 2009, at 18:46 , dan wrote:

> When I run the query:
> select c1,c2 from t
>
> I expect the explain to say index scan; instead it says table scan.

You're asking for the entire table: why perform the extra work of
using an index and then looking up entries in the table rather than
reading from the table directly? Compare trying to read an entire book
by looking up individual words in the index and then turning to the
appropriate page.

Michael Glaesemann
grzm seespotcode net

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Stephan Szabo 2009-10-13 23:49:54 Re: BUG #5113: Postgres not scanning indexes
Previous Message dan 2009-10-13 22:46:59 BUG #5113: Postgres not scanning indexes