From: | "Glen Parker" <glenebob(at)nwlink(dot)com> |
---|---|
To: | "Pg-General" <pgsql-general(at)postgresql(dot)org> |
Subject: | timestamp and indexes |
Date: | 2002-01-23 00:51:05 |
Message-ID: | 004501c1a3a8$09d1eb70$0b01a8c0@johnpark.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Hi all,
I seem to remember seeing something related to this on this list in the
past, but I can't find it now. So I'll be brief for starters.
I have a log table that's getting several thousand inserts per day, properly
vacuumed/analysed at night, etc. A query like this:
select * from log where date_log = now();
refuses to use the index on date_log (the timestamp).
explain says this:
Seq Scan on log (cost=0.00..2053.26 rows=8 width=80)
If I do 'set enable_seqscan to off', it still won't use the index.
Does this ring a bell with anyone? I can supply lots more data if needed...
Oh.. :-) This is PG_7.1.2 on Linux 2.2.
TIA
Glen Parker
glenebob(at)nwlink(dot)com
From | Date | Subject | |
---|---|---|---|
Next Message | Nic Ferrier | 2002-01-23 00:56:28 | Re: implemention of calls to stored procs. |
Previous Message | Tom Lane | 2002-01-23 00:25:02 | Re: detecting deadlocks |