Re: TABLESAMPLE usage - Mailing list pgsql-general

From Vik Fearing
Subject Re: TABLESAMPLE usage
Date
Msg-id 56A5F711.2010803@2ndquadrant.fr
Whole thread Raw
In response to Re: TABLESAMPLE usage  (Tom Smith <tomsmith1989sk@gmail.com>)
List pgsql-general
On 01/25/2016 09:55 AM, Tom Smith wrote:
> Thanks, the solution would work for fixed interval timestamp.
> But the data I am dealing with has irregular timestamp so can not be
> generated with exact steps.
>
> I would consider this a special case/method of random sampling, evenly
> distributed sampling according to the defined  timestamp index.

You could probably create your own sampling method to do what you want.

See contrib modules tsm_system_rows and tsm_system_time for guidance.
http://www.postgresql.org/docs/current/static/tsm-system-rows.html
http://www.postgresql.org/docs/current/static/tsm-system-time.html
--
Vik Fearing                                          +33 6 46 75 15 36
http://2ndQuadrant.fr     PostgreSQL : Expertise, Formation et Support


pgsql-general by date:

Previous
From: Brian Cardarella
Date:
Subject: Possible to dump/load a database from within psql?
Next
From: Raymond O'Donnell
Date:
Subject: Re: Possible to dump/load a database from within psql?