TABLESAMPLE usage

From: Tom Smith <tomsmith1989sk(at)gmail(dot)com>
To: PostgreSQL General <pgsql-general(at)postgresql(dot)org>
Subject: TABLESAMPLE usage
Date: 2016-01-25 04:09:43
Message-ID: CAKwSVFFYbfOBb2Ncr8BYCbs+WwhuMUXW13CrcE8VVD4Wh1nXsA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Responses

Browse pgsql-general by date

  From Date Subject
Next Message drum.lucas@gmail.com 2016-01-25 04:12:23 ERROR: check constraint - PostgreSQL 9.2
Previous Message Neil 2016-01-25 04:00:09 Re: A motion