pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: gnari <gnari@simnet.is>
To: BBI Edwin Punzalan <edwin@bluebamboo.ph>
To: pgsql-performance@postgresql.org
Subject: Re: FW: Index usage
Date: Wed, 24 Nov 2004 08:34:38 -0000
Message-ID: <001101c4d200$6fbe6c40$0100000a@wp2000> (raw)
References: <001d01c4d1fc$ab997060$b400a8c0@bluebamboo.ph>

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: <001101c4d200$6fbe6c40$0100000a@wp2000>
Permalink:  ../001101c4d200$6fbe6c40$0100000a@wp2000/
Also on:    postgresql.org/message-id/001101c4d200$6fbe6c40$0100000a@wp2000

 · 

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: gnari@simnet.is, edwin@bluebamboo.ph
  Subject: Re: FW: Index usage
  In-Reply-To: <001101c4d200$6fbe6c40$0100000a@wp2000>

* 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