Re: BUG #1122: limit 1 doing a sequential scan - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #1122: limit 1 doing a sequential scan
Date
Msg-id 4573.1080938196@sss.pgh.pa.us
Whole thread Raw
In response to BUG #1122: limit 1 doing a sequential scan  ("PostgreSQL Bugs List" <pgsql-bugs@postgresql.org>)
List pgsql-bugs
"PostgreSQL Bugs List" <pgsql-bugs@postgresql.org> writes:
> When I do a select * from table limit 1
> Postgresql does a sequential scan on the whole table.

AFAICS you simply are misreading the EXPLAIN output.

(It also sounds like you haven't vacuumed or analyzed that table in a
mighty long time... if you're having performance problems that is
probably the reason...)

            regards, tom lane

pgsql-bugs by date:

Previous
From: "PostgreSQL Bugs List"
Date:
Subject: BUG #1122: limit 1 doing a sequential scan
Next
From: "PostgreSQL Bugs List"
Date:
Subject: BUG #1123: breef description of postgre