X-Original-To: pgsql-performance-postgresql.org@postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 28E6A9FA5C3 for ; Thu, 8 Jun 2006 19:19:50 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 36363-10 for ; Thu, 8 Jun 2006 19:19:46 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id 6B1879FA3CD for ; Thu, 8 Jun 2006 19:19:45 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.6/8.13.6) with ESMTP id k58MJfRW002269; Thu, 8 Jun 2006 18:19:41 -0400 (EDT) To: "Jim C. Nasby" cc: Andrus , pgsql-performance@postgresql.org Subject: Re: Why date index is not used In-reply-to: <20060608215745.GE45331@pervasive.com> References: <196.1149794455@sss.pgh.pa.us> <20060608215745.GE45331@pervasive.com> Comments: In-reply-to "Jim C. Nasby" message dated "Thu, 08 Jun 2006 16:57:45 -0500" Date: Thu, 08 Jun 2006 18:19:41 -0400 Message-ID: <2268.1149805181@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200606/103 X-Sequence-Number: 19460 "Jim C. Nasby" writes: > And even then you better have a pretty high correlation on the first > column, otherwise you'll still get a seqscan. Not with the LIMIT. (If he were fetching the whole table, very possibly the sort would be the right plan anyway.) regards, tom lane