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 -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs