Re: General purpose hashing func in pgbench
От | Ildar Musin |
---|---|
Тема | Re: General purpose hashing func in pgbench |
Дата | |
Msg-id | 291822a3-0b3a-0b21-c694-c10776f516ac@postgrespro.ru обсуждение исходный текст |
Ответ на | Re: General purpose hashing func in pgbench (Fabien COELHO <coelho@cri.ensmp.fr>) |
Ответы |
Re: General purpose hashing func in pgbench
Re: General purpose hashing func in pgbench |
Список | pgsql-hackers |
10/01/2018 21:42, Fabien COELHO пишет: > > Hmm. I do not think that we should want a shared seed value. The seed > should be different for each call so as to avoid undesired > correlations. If wanted, correlation could be obtained by using an > explicit identical seed. > > ISTM that the best way to add the seed is to call random() when the > second arg is missing in make_func. Also, this means that the executor > would always get its two arguments, so it would simplify the code there. > Ok, I think I understand what you meant. You meant the case like following: \set x random(1, 100) \set h1 hash(:x) \set h2 hash(:x) -- will have different seed from h1 so that different instances of hash function within one script would have different seeds. Yes, that is a good idea, I can do that. -- Ildar Musin Postgres Professional: http://www.postgrespro.com Russian Postgres Company
В списке pgsql-hackers по дате отправления: