Re: gaussian distribution pgbench

From: KONDO Mitsumasa <kondo(dot)mitsumasa(at)lab(dot)ntt(dot)co(dot)jp>
To: Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: gaussian distribution pgbench
Date: 2014-03-03 04:03:06
Message-ID: 5313FEFA.3010802@lab.ntt.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

(2014/03/02 22:32), Fabien COELHO wrote:
>> Alvaro Herrera <alvherre(at)2ndquadrant(dot)com> writes:
>>> Seems that in the review so far, Fabien has focused mainly in the
>>> mathematical properties of the new random number generation. That seems
>>> perfectly fine, but no comment has been made about the chosen UI for the
>>> feature.
>>> Per the few initial messages in the thread, in the patch as submitted you ask
>>> for a gaussian random number by using \setgaussian, and exponential via
>>> \setexp. Is this the right UI?
> I thought it would be both concise & clear to have that as another form of \set*.
Yeah, but we got only two or three? concise. So I agree with discussing about UI.

> There is an additional argument expected. That would make:
>
> \setrandom foo 1 10 [uniform]
> \setrandom foo 1 :size gaussian 3.6
> \setrandom foo 1 100 exponential 7.2
It's good design. I think it will become more low overhead at part of parsing in
pgbench, because comparison of strings will be redeced(maybe). And I'd like to
remove [uniform], beacause we have to have compatibility for old scripts, and
random function always gets uniform distribution in common sense of programming.

However, new grammer is little bit long in user script. It seems trade-off that
are visibility of scripts and user writing cost.

Regards,
--
Mitsumasa KONDO
NTT Open Source Software Center

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew Dunstan 2014-03-03 04:13:19 Re: Review: Patch FORCE_NULL option for copy COPY in CSV mode
Previous Message Kyotaro HORIGUCHI 2014-03-03 03:08:09 Re: Hot standby doesn't come up on some situation.