Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
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

pgsql-bugs by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group