Re: Sequential vs. random values - number of pages in B-tree
От | Francisco Olarte |
---|---|
Тема | Re: Sequential vs. random values - number of pages in B-tree |
Дата | |
Msg-id | CA+bJJbxuoWUVfnh7FvpD53zSF93wzcdkeSwh4FwsRyuUzO=yug@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: Sequential vs. random values - number of pages in B-tree ("Daniel Verite" <daniel@manitou-mail.org>) |
Ответы |
Re: Sequential vs. random values - number of pages in
B-tree
|
Список | pgsql-general |
Daniel: On Thu, Aug 18, 2016 at 5:24 PM, Daniel Verite <daniel@manitou-mail.org> wrote: >> unless you know of an easy way to generate a random permutation on the >> fly without using a lot of memory, I do not. > It could be done by encrypting the stream. > For 32 bits integers: > https://wiki.postgresql.org/wiki/Skip32 > For 64 bits integers: > https://wiki.postgresql.org/wiki/XTEA Nearly, probably good enough for tests, but only generates a pseudorandom permutation if you encrypt 2**32/64 values, not with the 1..1E7 range, it will map them into 1E7 different numbers in the range 2**32/64. I think there are some pseudo-random number generators which can be made to work with any range, but do not recall which ones right now. Francisco Olarte.
В списке pgsql-general по дате отправления: