Re: BUG #13348: PostgreSQL 9.5 sampletable BUG return rows not the same as reltuples*sample factor?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: digoal(at)126(dot)com
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #13348: PostgreSQL 9.5 sampletable BUG return rows not the same as reltuples*sample factor?
Date: 2015-05-25 16:09:51
Message-ID: 10017.1432570191@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

digoal(at)126(dot)com writes:
> But when use BERNOULLI sample method, it's return rows not the same as
> reltuples*factor.
> Can we add filter to exact return rows equal to reltuples*factor ?

No. It is neither practical nor required by the standard that the number
of returned rows be exactly N*S. If we tried to do that, rows near the
end of the table would end up having a different probability of being
selected than rows near the front.

regards, tom lane

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Josh Berkus 2015-05-25 21:11:34 Re: [CORE] [BUGS] BUG #13350: blindly fsyncing data dir considered harmful
Previous Message Stephen Frost 2015-05-25 16:06:26 Re: [CORE] [BUGS] BUG #13350: blindly fsyncing data dir considered harmful