X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 759A99F946D; Sat, 20 May 2006 22:47:48 -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 62826-10; Sat, 20 May 2006 22:47:43 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- X-Greylist: from auto-whitelisted by SQLgrey- Received: from grzm.com (grzm.com [200.46.204.98]) by postgresql.org (Postfix) with ESMTP id D138B9F9316; Sat, 20 May 2006 22:47:43 -0300 (ADT) Received: from [172.16.1.101] (unknown [61.197.227.146]) by grzm.com (Postfix) with ESMTP id DE981161B81A; Sun, 21 May 2006 02:47:40 +0100 (BST) In-Reply-To: <20060520223704.T1114@ganymede.hub.org> References: <20060520223704.T1114@ganymede.hub.org> Mime-Version: 1.0 (Apple Message framework v750) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: Cc: pgsql-sql@postgresql.org Content-Transfer-Encoding: 7bit From: Michael Glaesemann Subject: Re: timestamp query doesn't use an index ... Date: Sun, 21 May 2006 10:47:39 +0900 To: Marc G. Fournier X-Mailer: Apple Mail (2.750) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200605/159 X-Sequence-Number: 25190 On May 21, 2006, at 10:42 , Marc G. Fournier wrote: > -> Seq Scan on page_schedule ps2 (cost=0.00..2364.95 > rows=33110 width=16) (actual time=0.021..623.363 rows=94798 loops=1) I don't know about rewriting the query, but it appears your statistics are a little out of date (e.g., rows expected/actual 33110/94798). Does running ANALYZE help? Michael Glaesemann grzm seespotcode net