Re: General purpose hashing func in pgbench

From: Ildar Musin <i(dot)musin(at)postgrespro(dot)ru>
To: Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: General purpose hashing func in pgbench
Date: 2018-01-27 09:44:24
Message-ID: 12986cad-3dd9-a449-e318-4acd8a8e1697@postgrespro.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hello Fabien,

26/01/2018 09:28, Fabien COELHO пишет:
>
> Hello Ildar,
>
> Applies, compiles, runs.
>
> I still have a few very minor comments, sorry for this (hopefully)
> last iteration from my part. I'm kind of iterative...
>
> The XML documentation source should avoid a paragraph on one very long
> line, but rather be indented like other sections.
>
> I'd propose simplify the second part:
>
>   Hash functions can be used, for example, to modify the distribution of
>   <literal>random_zipfian</literal> or
> <literal>random_exponential</literal>
>   functions in order to obtain scattered distribution.
>   Thus the following pgbench script simulates possible real world
> workload
>   typical for social media and blogging platforms where few accounts
>   generate excessive load:
>
> ->
>
>   Hash functions can be used to scatter the distribution of random
>   functions such as <literal>random_zipfian</literal> or
>   <literal>random_exponential</literal>.
>   For instance, the following pgbench script simulates possible real
>   world workload typical for social media and blogging platforms where
>   few accounts generate excessive load:
>
> Comment the Assert(0) as an internal error that cannot happen.
>
> I'd suggest to compact the execution code by declaring int64 variable
> and coerce to int in one go, like the integer bitwise functions. I'm
> in favor to keeping them in their own case and not reuse this one.
>
I did everything you mention here and attached a new version on the patch.
Thank you!

--
Ildar Musin
Postgres Professional: http://www.postgrespro.com
Russian Postgres Company

Attachment Content-Type Size
pgbench_hash_v10.patch text/plain 12.8 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Oliver Ford 2018-01-27 10:49:46 Re: Add RANGE with values and exclusions clauses to the Window Functions
Previous Message Amit Kapila 2018-01-27 08:20:25 Re: [HACKERS] Parallel tuplesort (for parallel B-Tree index creation)