X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 907C83A3B94 for ; Wed, 24 Nov 2004 09:43:32 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 92335-01 for ; Wed, 24 Nov 2004 09:43:20 +0000 (GMT) Received: from bluebamboo.ph (unknown [202.175.252.53]) by svr1.postgresql.org (Postfix) with ESMTP id 85B9D3A3B62 for ; Wed, 24 Nov 2004 09:43:20 +0000 (GMT) Received: from irridescens ([192.168.0.180]) by bluebamboo.ph (8.11.6/8.11.6) with ESMTP id iAO9iHi31430; Wed, 24 Nov 2004 17:44:17 +0800 From: "BBI Edwin Punzalan" To: "'gnari'" , Subject: Re: FW: Index usage Date: Wed, 24 Nov 2004 17:43:52 +0800 Message-ID: <000501c4d20a$1b842ed0$b400a8c0@bluebamboo.ph> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.4510 In-Reply-To: <001101c4d200$6fbe6c40$0100000a@wp2000> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 Importance: Normal X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200411/372 X-Sequence-Number: 9326 Yes, the database is being vacuum-ed and analyzed on a daily basis. Our version is 7.2.1 -----Original Message----- From: gnari [mailto:gnari@simnet.is] Sent: Wednesday, November 24, 2004 4:35 PM To: BBI Edwin Punzalan; pgsql-performance@postgresql.org Subject: Re: [PERFORM] FW: Index usage From: "BBI Edwin Punzalan" > db=# explain analyze select date from chatlogs where date>='11/23/04' > and date<'11/25/04'; > NOTICE: QUERY PLAN: > > Seq Scan on chatlogs (cost=0.00..24763.19 rows=9200 width=4) (actual > time=0.45..4268.00 rows=23787 loops=1) Total runtime: 4282.81 msec > ============== > > How come a query on the current date filter uses an index and the > others does not? This makes indexing to speed up queries quite > difficult. have you ANALYZED the table lately ? what version postgres are you using ? gnari