From: BBI Edwin Punzalan <edwin@bluebamboo.ph>
To: pgsql-performance@postgresql.org
Subject: FW: Index usage
Date: Wed, 24 Nov 2004 14:52:07 +0800
Message-ID: <001401c4d1f2$1df5df00$b400a8c0@bluebamboo.ph> (raw)
Hi everyone,
Can anyone please explain postgres' behavior on our index.
I did the following query tests on our database:
====================
db=# create index chatlogs_date_idx on chatlogs (date);
CREATE
db=# explain select date from chatlogs where date>='11/23/04';
NOTICE: QUERY PLAN:
Index Scan using chatlogs_date_idx on chatlogs (cost=0.00..144.11 rows=36
width=4)
EXPLAIN
db=# explain select date from chatlogs where date>='10/23/04';
NOTICE: QUERY PLAN:
Seq Scan on chatlogs (cost=0.00..23938.06 rows=253442 width=4)
EXPLAIN====================
Date's datatype is date. Its just odd that I just change the actual date of
search and the index is not being used anymore.
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
Subject: Re: FW: Index usage
In-Reply-To: <001401c4d1f2$1df5df00$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