pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: BBI Edwin Punzalan <edwin@bluebamboo.ph>
To: 'gnari' <gnari@simnet.is>
To: pgsql-performance@postgresql.org
Subject: Re: FW: Index usage
Date: Wed, 24 Nov 2004 17:43:52 +0800
Message-ID: <000501c4d20a$1b842ed0$b400a8c0@bluebamboo.ph> (raw)
In-Reply-To: <001101c4d200$6fbe6c40$0100000a@wp2000>


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" <edwin@bluebamboo.ph>

> 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






view thread (34+ messages)  latest in thread

Message-ID: <000501c4d20a$1b842ed0$b400a8c0@bluebamboo.ph>
Permalink:  ../000501c4d20a$1b842ed0$b400a8c0@bluebamboo.ph/
Also on:    postgresql.org/message-id/000501c4d20a$1b842ed0$b400a8c0@bluebamboo.ph

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: edwin@bluebamboo.ph, gnari@simnet.is
  Subject: Re: FW: Index usage
  In-Reply-To: <000501c4d20a$1b842ed0$b400a8c0@bluebamboo.ph>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox