Re: Selecting a random row

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Selecting a random row
Дата
Msg-id 26807.1099590041@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Selecting a random row  ("gnari" <gnari@simnet.is>)
Список pgsql-general
"gnari" <gnari@simnet.is> writes:
> Tthe problem with this is that this is not very random.
> If the uids 30000 to 39999 have been missing, but
> the uids are more or less contiguous apart from that,
> the uid 40000 would be 10000 times more likely to be selected
> than average.

There is some discussion of selecting random rows in the list archives.
My recollection is that we decided the only way to be fast *and*
truly random was to dedicate an extra column to be a random key.

            regards, tom lane

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

Предыдущее
От: Patrick Hatcher
Дата:
Сообщение: how to edit a function from psql?
Следующее
От: Kari Lavikka
Дата:
Сообщение: Re: Selecting a random row