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 5C2543A525B for ; Wed, 1 Dec 2004 02:32:40 +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 27890-01 for ; Wed, 1 Dec 2004 02:32:30 +0000 (GMT) Received: from bluebamboo.ph (unknown [202.175.252.53]) by svr1.postgresql.org (Postfix) with ESMTP id 3BC543A53B8 for ; Wed, 1 Dec 2004 02:32:32 +0000 (GMT) Received: from irridescens ([192.168.0.180]) by bluebamboo.ph (8.11.6/8.11.6) with ESMTP id iB12XBi19542; Wed, 1 Dec 2004 10:33:11 +0800 From: "BBI Edwin Punzalan" To: "'gnari'" , Subject: Re: FW: Index usage Date: Wed, 1 Dec 2004 10:33:15 +0800 Message-ID: <004c01c4d74e$1c61d110$b400a8c0@bluebamboo.ph> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.4510 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 In-reply-to: <017c01c4d74a$90805de0$0100000a@wp2000> Importance: Normal X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests= X-Spam-Level: X-Archive-Number: 200412/4 X-Sequence-Number: 9379 Thanks but whatever it does, it didn't work. :D Do you think upgrading will fix this problem? =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= db=3D# alter table chatlogs alter column date set statistics 300; ALTER db=3D# analyze chatlogs; ANALYZE db=3D# explain analyze select * from chatlogs where date >=3D '12/1/04'; NOTICE: QUERY PLAN: Index Scan using chatlogs_type_idx on chatlogs (cost=3D0.00..6053.61 rows=3D3357 width=3D212) (actual time=3D22.14..138.53 rows=3D1312 loops=3D1) Total runtime: 139.42 msec EXPLAIN morphTv=3D# explain analyze select * from chatlogs where date >=3D = '11/03/04'; NOTICE: QUERY PLAN: Seq Scan on chatlogs (cost=3D0.00..27252.86 rows=3D271882 width=3D212) = (actual time=3D12.24..13419.36 rows=3D257137 loops=3D1) Total runtime: 13573.70 msec EXPLAIN =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= -----Original Message----- From: gnari [mailto:gnari@simnet.is]=20 Sent: Wednesday, December 01, 2004 10:08 AM To: BBI Edwin Punzalan; pgsql-performance@postgresql.org Subject: Re: [PERFORM] FW: Index usage From: "BBI Edwin Punzalan" >=20 > Hi, what do you mean by increasing the statistics on the date column? alter table chatlogs alter column date set statistics 300; analyze = chatlogs; > > > Our version is 7.2.1 > >=20 > > upgrade time ? >=20 > We never had any upgrade on it. 7.2 is a bit dated now that 8.0 is in beta if you want to stay with 7.2, you should at least upgrade to the latest point release (7.2.6 ?), as several serious bugs have been fixed gnari