Re: pg_sample

From: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
To: Patrick B <patrickbakerbr(at)gmail(dot)com>
Cc: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: pg_sample
Date: 2016-10-19 00:39:30
Message-ID: CAB7nPqRno7of8yw5nMGJXVyYcCjbouNuJagYPJkA1moeCeqowA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wed, Oct 19, 2016 at 9:24 AM, Patrick B <patrickbakerbr(at)gmail(dot)com> wrote:
> However, this new database test server doesn't need to have all the data. I
> would like to have only the first 100 rows(example) of each table in my
> database.
>
> I'm using pg_sample to do that, but unfortunately it doesn't work well.
> It doesn't get the first 100 rows. It gets random 100 rows.

Why aren't 100 random rows enough to fulfill what you are looking for?
What you are trying here is to test the server with some sample data,
no? In this case, having the first 100 rows, or a set of random ones
should not matter much (never tried pg_sample to be honest).
--
Michael

In response to

  • pg_sample at 2016-10-19 00:24:10 from Patrick B

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Patrick B 2016-10-19 01:30:14 Re: pg_sample
Previous Message Michael Paquier 2016-10-19 00:30:22 Re: json rendering without pretty option (compact)