SQL speedup on timestamp filtering

Поиск
Список
Период
Сортировка
От Jean-Christophe ARNU (JX)
Тема SQL speedup on timestamp filtering
Дата
Msg-id 20030722155328.1b467e75.arnu@paratronic.fr
обсуждение исходный текст
Список pgsql-general
Hi there :)

    I have a large table with (not only but important) timestamp and value
(double) columns.
    I would like to "sample" data at given timestamps values (I have one value
each minute and I would like to get each 5 minutes value on a given timestamp
range) and get the corresponding values.

    As I'm quite bad at SQL but is there a way with pg to get a timestamp modulo
an interval? Is there a way to optimize this (indexing in a different way,
designing database another way or writting stored procedure that would do the
job efficiently)?

    Thanks in advance!

--
Jean-Christophe ARNU
Paratronic

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Postgres Database Error Codes and Error Messages
Следующее
От: Richard Huxton
Дата:
Сообщение: Re: can anybody help me please