TABLESAMPLE usage - Mailing list pgsql-general

From Tom Smith
Subject TABLESAMPLE usage
Date
Msg-id CAKwSVFFYbfOBb2Ncr8BYCbs+WwhuMUXW13CrcE8VVD4Wh1nXsA@mail.gmail.com
Whole thread Raw
Responses Re: TABLESAMPLE usage  (Vik Fearing <vik@2ndquadrant.fr>)
List pgsql-general
Hello:

I have a big table with that is always appended with new data with a unique
sequence id  (always incremented, or timestamp as unique index) each row.
I'd like to sample, say 100 rows out of say 1000 rows evently across all the rows,
so that it would return  rows  of1, 101, 201, 301    you get idea.
can TABLESAMPLE    get one row for every 100 rows, based on the order
of the rows added to table using the timestamp as already indexed/sorted sequence

Thanks




pgsql-general by date:

Previous
From: Neil
Date:
Subject: Re: A motion
Next
From: "drum.lucas@gmail.com"
Date:
Subject: ERROR: check constraint - PostgreSQL 9.2