indices not being used

Поиск
Список
Период
Сортировка
От Juuso Oikarinen
Тема indices not being used
Дата
Msg-id Pine.LNX.4.10.9911180118120.5337-100000@area51.ton.tut.fi
обсуждение исходный текст
Список 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



В списке pgsql-general по дате отправления:

Предыдущее
От: Mark Kirkwood
Дата:
Сообщение: RE: Using functions with indexes
Следующее
От: The Hermit Hacker
Дата:
Сообщение: Projects Database grows ...