Re: gaussian distribution pgbench - Mailing list pgsql-hackers

From Heikki Linnakangas
Subject Re: gaussian distribution pgbench
Date
Msg-id 5322E98E.1050005@vmware.com
Whole thread Raw
In response to Re: gaussian distribution pgbench  (Fujii Masao <masao.fujii@gmail.com>)
Responses Re: gaussian distribution pgbench  (Fabien COELHO <coelho@cri.ensmp.fr>)
List pgsql-hackers
On 03/13/2014 04:00 PM, Fujii Masao wrote:
> On Thu, Mar 13, 2014 at 10:51 PM, Heikki Linnakangas
> <hlinnakangas@vmware.com> wrote:
>> IMHO we should just implement the \setrandom changes, and not add any of
>> these options to modify the standard test workload. If someone wants to run
>> TPC-B workload with gaussian or exponential distribution, they can implement
>> it as a custom script. The docs include the script for the standard TPC-B
>> workload; just copy-paster that and modify the \setrandom lines.
>
> Yeah, I'm OK with this.

So I took a look at the \setrandom parts of this patch to see if that's
ready for commit, without any of the changes to modify the standard
TPC-B workload. Attached is a patch with just those parts; everyone
please focus on this.

A couple of comments:

* There should be an explicit "\setrandom ... uniform" option too, even
though you get that implicitly if you don't specify the distribution

* What exactly does the "threshold" mean? The docs informally explain
that "the larger the thresold, the more frequent values close to the
middle of the interval are drawn", but that's pretty vague.

* Does min and max really make sense for gaussian and exponential
distributions? For gaussian, I would expect mean and standard deviation
as the parameters, not min/max/threshold.

* How about setting the variable as a float instead of integer? Would
seem more natural to me. At least as an option.

- Heikki

Attachment

pgsql-hackers by date:

Previous
From: Kyotaro HORIGUCHI
Date:
Subject: Re: Archive recovery won't be completed on some situation.
Next
From: Heikki Linnakangas
Date:
Subject: Re: Archive recovery won't be completed on some situation.