Re: FW: Index usage - Mailing list pgsql-performance

From BBI Edwin Punzalan
Subject Re: FW: Index usage
Date
Msg-id 004c01c4d74e$1c61d110$b400a8c0@bluebamboo.ph
Whole thread Raw
In response to Re: FW: Index usage  ("gnari" <gnari@simnet.is>)
List pgsql-performance
Thanks but whatever it does, it didn't work. :D

Do you think upgrading will fix this problem?

=========================
db=# alter table chatlogs alter column date set statistics 300;
ALTER
db=# analyze chatlogs;
ANALYZE
db=# explain analyze select * from chatlogs where date >= '12/1/04';
NOTICE:  QUERY PLAN:

Index Scan using chatlogs_type_idx on chatlogs  (cost=0.00..6053.61
rows=3357 width=212) (actual time=22.14..138.53 rows=1312
loops=1)
Total runtime: 139.42 msec

EXPLAIN
morphTv=# explain analyze select * from chatlogs where date >= '11/03/04';
NOTICE:  QUERY PLAN:

Seq Scan on chatlogs  (cost=0.00..27252.86 rows=271882 width=212) (actual
time=12.24..13419.36 rows=257137 loops=1)
Total runtime: 13573.70 msec

EXPLAIN
=========================



-----Original Message-----
From: gnari [mailto:gnari@simnet.is]
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" <edwin@bluebamboo.ph>


>
> 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
> >
> > upgrade time ?
>
> 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


pgsql-performance by date:

Previous
From: "gnari"
Date:
Subject: Re: FW: Index usage
Next
From: "Iain"
Date:
Subject: Re: FW: Index usage