Re: [WIP] Zipfian distribution in pgbench
Fabien COELHO <coelho@cri.ensmp.fr>
From: Fabien COELHO <coelho@cri.ensmp.fr>
To: Alik Khilazhev <a.khilazhev@postgrespro.ru>
Cc: PostgreSQL Developers <pgsql-hackers@postgresql.org>
Date: 2017-07-17T11:42:13Z
Lists: pgsql-hackers
Hello, >> Is this bias expected from the drawing method, say because it is >> approximated and the approximation is weak at some points, or is there >> an issue with its implementation, says some shift which gets smoothed >> down for higher indexes? > > I have checked paper where such implementation was proposed and there > theta allowed only on range between 0 and 1. It seems like it is not > guaranteed that it should work well when theta is more than 1. Ok. I see a significant issue with having a random_zipfian function which does not really return a zipfian distribution under some parameter values. If there is no better alternative, I would suggest to restrict the parameter for values between 0 and 1, or to find a better approximation for theta >= 0. > I am attaching paper, see page 23. Thanks for the paper. It reminds me that I intended to propose a parametric pseudo-random permutation for pgbench, some day. -- Fabien.
Commits
-
Add approximated Zipfian-distributed random generator to pgbench.
- 1fcd0adeb38d 11.0 landed