Received: from localhost (unknown [200.46.204.182]) by postgresql.org (Postfix) with ESMTP id 5C6219FB7EB for ; Mon, 22 Oct 2007 23:42:25 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.182]) (amavisd-maia, port 10024) with ESMTP id 84940-02 for ; Mon, 22 Oct 2007 23:42:14 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from serv01.siteground137.com (ns1.siteground137.com [67.15.250.10]) by postgresql.org (Postfix) with ESMTP id EFE099FB7EA for ; Mon, 22 Oct 2007 23:42:20 -0300 (ADT) Received: from c-71-193-202-175.hsd1.or.comcast.net ([71.193.202.175]:43028 helo=[192.168.1.2]) by serv01.siteground137.com with esmtpa (Exim 4.68) (envelope-from ) id 1Ik9id-0007uA-Dl; Mon, 22 Oct 2007 21:42:11 -0500 Subject: Re: Seqscan From: Jeff Davis To: Adrian Demaestri Cc: pgsql-performance@postgresql.org In-Reply-To: <853733.8751.qm@web50901.mail.re2.yahoo.com> References: <853733.8751.qm@web50901.mail.re2.yahoo.com> Content-Type: text/plain Date: Mon, 22 Oct 2007 19:45:11 -0700 Message-Id: <1193107511.26301.59.camel@jdavis> Mime-Version: 1.0 X-Mailer: Evolution 2.10.3 Content-Transfer-Encoding: 7bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - serv01.siteground137.com X-AntiAbuse: Original Domain - postgresql.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - j-davis.com X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200710/246 X-Sequence-Number: 27268 On Mon, 2007-10-22 at 19:24 -0700, Adrian Demaestri wrote: > Hi, > I think planner should use other plans than seqscan to solve querys > like select * from hugetable limit 1, especially when the talbe is > very large. Is it solved in newer versions or is there some open > issues about it?. > thanks > I'm working with postgres 8.0.1, For the query in question, what would be faster than a seqscan? It doesn't read the whole table, it only reads until it satisfies the limit clause. Regards, Jeff Davis