From: | Noah Misch <noah(at)leadboat(dot)com> |
---|---|
To: | Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr> |
Cc: | PostgreSQL Developers <pgsql-hackers(at)postgresql(dot)org>, pavel(dot)stehule(at)gmail(dot)com |
Subject: | Re: pgbench progress report improvements - split 2 |
Date: | 2013-09-26 03:14:13 |
Message-ID: | 20130926031413.GA45039@tornado.leadboat.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Tue, Sep 24, 2013 at 08:42:15PM +0200, Fabien COELHO wrote:
>> meet all those goals simultaneously with simpler code, can we not?
>>
>> int64 wait = (int64) (throttle_delay *
>> Min(7.0, -log(1 - pg_erand48(thread->random_state))));
>
> If you truncate roughly the multipler, as it is done here with "min", you
> necessarily create a bias, my random guess would be a 0.5% under
> estimation, but maybe it is more... Thus you would have to compute and
> the correcting factor as well. Its computation is a little bit less easy
> than with the quantized formula where I just used a simple SUM, and you
> have to really do the maths here. So I would keep the simple solution,
> but it is fine with me if you do the maths!
Ah, true; I guess each approach has different advantages. I've committed your
latest version.
--
Noah Misch
EnterpriseDB http://www.enterprisedb.com
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2013-09-26 03:19:12 | Re: INSERT...ON DUPLICATE KEY LOCK FOR UPDATE |
Previous Message | Michael Paquier | 2013-09-26 03:13:30 | Re: Support for REINDEX CONCURRENTLY |