diff options
Diffstat (limited to 'doc/src')
-rw-r--r-- | doc/src/sgml/ref/pgbench.sgml | 27 |
1 files changed, 11 insertions, 16 deletions
diff --git a/doc/src/sgml/ref/pgbench.sgml b/doc/src/sgml/ref/pgbench.sgml index f11d36620d6..ee2501be552 100644 --- a/doc/src/sgml/ref/pgbench.sgml +++ b/doc/src/sgml/ref/pgbench.sgml @@ -1543,29 +1543,17 @@ f(x) = PHI(2.0 * parameter * (x - mu) / (max - min + 1)) / middle quarter (1.0 / 4.0) of the interval (i.e. from <literal>3.0 / 8.0</literal> to <literal>5.0 / 8.0</literal>) and 95% from the middle half (<literal>2.0 / 4.0</literal>) of the interval (second and third - quartiles). The minimum <replaceable>parameter</replaceable> is 2.0 for performance - of the Box-Muller transform. + quartiles). The minimum allowed <replaceable>parameter</replaceable> + value is 2.0. </para> </listitem> <listitem> <para> - <literal>random_zipfian</literal> generates an approximated bounded Zipfian - distribution. For <replaceable>parameter</replaceable> in (0, 1), an - approximated algorithm is taken from - "Quickly Generating Billion-Record Synthetic Databases", - Jim Gray et al, SIGMOD 1994. For <replaceable>parameter</replaceable> - in (1, 1000), a rejection method is used, based on - "Non-Uniform Random Variate Generation", Luc Devroye, p. 550-551, - Springer 1986. The distribution is not defined when the parameter's - value is 1.0. The function's performance is poor for parameter values - close and above 1.0 and on a small range. - </para> - <para> + <literal>random_zipfian</literal> generates a bounded Zipfian + distribution. <replaceable>parameter</replaceable> defines how skewed the distribution is. The larger the <replaceable>parameter</replaceable>, the more frequently values closer to the beginning of the interval are drawn. - The closer to 0 <replaceable>parameter</replaceable> is, - the flatter (more uniform) the output distribution. The distribution is such that, assuming the range starts from 1, the ratio of the probability of drawing <replaceable>k</replaceable> versus drawing <replaceable>k+1</replaceable> is @@ -1576,6 +1564,13 @@ f(x) = PHI(2.0 * parameter * (x - mu) / (max - min + 1)) / itself is produced <literal>(3/2)*2.5 = 2.76</literal> times more frequently than <literal>3</literal>, and so on. </para> + <para> + <application>pgbench</application>'s implementation is based on + "Non-Uniform Random Variate Generation", Luc Devroye, p. 550-551, + Springer 1986. Due to limitations of that algorithm, + the <replaceable>parameter</replaceable> value is restricted to + the range [1.001, 1000]. + </para> </listitem> </itemizedlist> |