Re: BUG #1122: limit 1 doing a sequential scan

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "P Buder" <pb2(at)aracnet(dot)com>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #1122: limit 1 doing a sequential scan
Date: 2004-04-02 20:36:36
Message-ID: 4573.1080938196@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

"PostgreSQL Bugs List" <pgsql-bugs(at)postgresql(dot)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

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message PostgreSQL Bugs List 2004-04-03 09:20:17 BUG #1123: breef description of postgre
Previous Message PostgreSQL Bugs List 2004-04-02 20:18:28 BUG #1122: limit 1 doing a sequential scan