Re: BUG #5113: Postgres not scanning indexes - Mailing list pgsql-bugs

From Michael Glaesemann
Subject Re: BUG #5113: Postgres not scanning indexes
Date
Msg-id E337CBD9-6709-40C3-9F27-2D44C0B0A57B@seespotcode.net
Whole thread Raw
In response to BUG #5113: Postgres not scanning indexes  ("dan" <dan.boeriu@roost.com>)
List 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

pgsql-bugs by date:

Previous
From: "dan"
Date:
Subject: BUG #5113: Postgres not scanning indexes
Next
From: Stephan Szabo
Date:
Subject: Re: BUG #5113: Postgres not scanning indexes