From: | Alvaro Herrera <alvherre(at)2ndquadrant(dot)com> |
---|---|
To: | Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr> |
Cc: | KONDO Mitsumasa <kondo(dot)mitsumasa(at)lab(dot)ntt(dot)co(dot)jp>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: gaussian distribution pgbench |
Date: | 2014-02-28 21:22:32 |
Message-ID: | 20140228212232.GA11071@eldon.alvh.no-ip.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
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? Currently you get
an evenly distributed number with \setrandom. There is nothing that
makes it obvious on \setgaussian by itself that it produces random
numbers. Perhaps we should simply add a new argument to \setrandom,
instead of creating new commands for each distribution? I would guess
that, in the future, we're going to want other distributions as well.
Not sure what it would look like; perhaps
\setrandom foo 1 10 gaussian
or
\setrandom foo 1 10 dist=gaussian
or
\setrandom(gaussian) foo 1 10
or
\setrandom(dist=gaussian) foo 1 10
I think we could easily support
\set distrib gaussian
\setrandom(dist=:distrib) foo 1 10
so that it can be changed for a bunch of commands easily.
Or maybe I'm going overboard, everybody else is happy with \setgaussian,
and should just use that?
--
Álvaro Herrera http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services
From | Date | Subject | |
---|---|---|---|
Next Message | Andrew Dunstan | 2014-02-28 21:25:34 | Re: jsonb and nested hstore |
Previous Message | Josh Berkus | 2014-02-28 21:03:02 | Re: jsonb and nested hstore |