Re: SELECTing every Nth record for better performance
От | Richard Broersma |
---|---|
Тема | Re: SELECTing every Nth record for better performance |
Дата | |
Msg-id | 396486430912032150t447a315p55393e84f47fc276@mail.gmail.com обсуждение исходный текст |
Ответ на | SELECTing every Nth record for better performance (Tom <tom@cstcomposites.com>) |
Ответы |
Re: SELECTing every Nth record for better performance
|
Список | pgsql-general |
On Thu, Dec 3, 2009 at 9:26 PM, Tom <tom@cstcomposites.com> wrote: > I > want run a query that skips every nth record and returns a managable > dataset that still gives a correct overview of the data without > slowing the programme down. Is there an easy way to do this that I > have overlooked? I looked at: I've played with datalogging. It was very easy to find nth records when using date_trunc() on a timestamp. The only minor problem with data_trunc was that I couldn't create arbitrary granularity. For example it is easy to date_trunc() on an year, month, week, day, hour or a minute but I wanted 5, 10 and 15 minute increments. I bet there could be a solution to this, but I never looked into it. To improve the select performance, I created functional indexes using different data_trunc() granularities. -- Regards, Richard Broersma Jr. Visit the Los Angeles PostgreSQL Users Group (LAPUG) http://pugs.postgresql.org/lapug
В списке pgsql-general по дате отправления: