From: | Juuso Oikarinen <oikarine(at)c180a(dot)mtalo(dot)ton(dot)tut(dot)fi> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | indices not being used |
Date: | 1999-11-17 23:26:59 |
Message-ID: | Pine.LNX.4.10.9911180118120.5337-100000@area51.ton.tut.fi |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
hello
I looked through a lot of previous messages, found many related
messages, but didn't find a solution to my problem.
I have a simple table of three fields,
timestamp datetime, reading1 real, and reading2 real, and
80k rows.
I have tried to create btree and hash indexes for the field timestamp, and
yes, have vacuumed it after that.
Explain still always tells me that it uses a sequential scan
for example for this simple query:
select max(timestamp) from readings;
Whis takes way too long, it takes many seconds. I would think indices
could speed this kind of simple queries tremendously.. I just don't
get postgresql to use them :(
Any suggestions?
My version of psql is 6.4.2.
rgds
Juuso Oikarinen http://www.students.tut.fi/~oikarine
Hiroshima '45 - Czernobyl '86 - Windows '95
From | Date | Subject | |
---|---|---|---|
Next Message | The Hermit Hacker | 1999-11-18 06:33:25 | Projects Database grows ... |
Previous Message | Mark Kirkwood | 1999-11-17 23:02:29 | RE: Using functions with indexes |