X-Original-To: pgsql-sql@postgresql.org Received: from spampd.localdomain (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 6A9B2476305 for ; Thu, 8 May 2003 01:26:48 -0400 (EDT) Received: from sss.pgh.pa.us (unknown [192.204.191.242]) by postgresql.org (Postfix) with ESMTP id AEC3B475B8E for ; Thu, 8 May 2003 01:26:46 -0400 (EDT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.9/8.12.9) with ESMTP id h485QjU6017621; Thu, 8 May 2003 01:26:46 -0400 (EDT) To: david@stanaway.net Cc: pgsql-sql@postgresql.org Subject: Re: Timestamp index not used In-reply-to: <50240.10.0.50.1.1052366175.squirrel@david.stanaway.net> References: <50240.10.0.50.1.1052366175.squirrel@david.stanaway.net> Comments: In-reply-to message dated "Wed, 07 May 2003 22:56:15 -0500" Date: Thu, 08 May 2003 01:26:45 -0400 Message-ID: <17620.1052371605@sss.pgh.pa.us> From: Tom Lane X-Spam-Status: No, hits=-25.8 required=5.0 tests=BAYES_00,IN_REP_TO,QUOTED_EMAIL_TEXT,REFERENCES, REPLY_WITH_QUOTES autolearn=ham version=2.50 X-Spam-Level: X-Spam-Checker-Version: SpamAssassin 2.50 (1.173-2003-02-20-exp) X-Archive-Number: 200305/155 X-Sequence-Number: 13320 writes: > radius=# EXPLAIN SELECT * from alldata where loggedat > '2003-05-07'; > NOTICE: QUERY PLAN: > Seq Scan on alldata (cost=0.00..286136.26 rows=1428487 width=780) ^^^^^^^^^^^^ The planner seems to think that this query will return rather a lot of rows ... which would imply that a seqscan isn't necessarily a bad idea. Is that rows estimate accurate? (If not, have you ANALYZEd this table lately?) regards, tom lane