Re: Query performance on session table

Поиск
Список
Период
Сортировка
От Michael Glaesemann
Тема Re: Query performance on session table
Дата
Msg-id 00F6E834-A4FA-4184-A1C8-BAE78764BC49@seespotcode.net
обсуждение исходный текст
Ответ на Re: Query performance on session table  ("Burak Seydioglu" <buraks78@gmail.com>)
Список pgsql-novice
On Jun 28, 2007, at 22:28 , Burak Seydioglu wrote:

> This query is really fast as you can see in my original post.

Ah. I should have referred to your original email.

> The garbage collector (DELETE FROM session WHERE session_expires <
> timestamp) has to do the same sequential scan.

You may find benefit from putting an index on the session_expires
column, though of course to maintain the index with a lot of updates,
you may see update performance degrade because the update requires
the index to be updated as well. The only way to find out is by
benchmarking your app and see what happens. With such a small number
of rows, the planner may determine that a sequential scan is still
faster than an index scan, so you'd end up with the same performance
on DELETE that you have now.

> Thank you for you input.

Well, we're both learning together :)

Michael Glaesemann
grzm seespotcode net



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

Предыдущее
От: "Burak Seydioglu"
Дата:
Сообщение: Re: Query performance on session table
Следующее
От: "Dale Cooper"
Дата:
Сообщение: A few comparison terms just to be sure.