Re: add modulo (%) operator to pgbench

Поиск
Список
Период
Сортировка
От Fabien COELHO
Тема Re: add modulo (%) operator to pgbench
Дата
Msg-id alpine.DEB.2.10.1408041110300.18656@sto
обсуждение исходный текст
Ответ на add modulo (%) operator to pgbench  (Fabien <coelho@cri.ensmp.fr>)
Ответы Re: add modulo (%) operator to pgbench  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers

> This patch is pretty trivial.

Another slightly less trivial but more useful version.

The issue is that there are 3 definitions of modulo, two of which are fine 
(Knuth floored division and Euclidian), and the last one much less useful. 
Alas, C (%) & SQL (MOD) choose the bad definition:-( I really need any of 
the other two. The attached patch adds all versions, with "%" and "mod" 
consistent with their C and SQL unfortunate counterparts, and "fmod" and 
"emod" the sane ones.

> Add modulo operator to pgbench.
>
> This is useful to compute a permutation for tests with non uniform 
> accesses (exponential or gaussian), so as to avoid trivial correlations 
> between neighbour keys.

-- 
Fabien.

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Heikki Linnakangas
Дата:
Сообщение: Re: Looked at TODO:Considering improving performance of computing CHAR() value lengths
Следующее
От: Seref Arikan
Дата:
Сообщение: How to manage shared library lifetime through C functions