Re: Selecting K random rows - efficiently!

Поиск
Список
Период
Сортировка
От cluster
Тема Re: Selecting K random rows - efficiently!
Дата
Msg-id ffn1i3$2f16$1@news.hub.org
обсуждение исходный текст
Ответ на Selecting K random rows - efficiently!  (cluster <skrald@amossen.dk>)
Ответы Re: Selecting K random rows - efficiently!  (Martijn van Oosterhout <kleptog@svana.org>)
Список pgsql-general
Another way to look at the problem is: How do I sample a subset of size
K efficiently? A query like

    SAMPLE 1000 OF
    (SELECT * FROM mydata WHERE <some condition>)

should return 1000 random rows from the select statement so that two
consecutive evaluations of the query would only with very little
probability return the same 1000 rows.
(Yes, I know that "SAMPLE 1000 OF" is not valid SQL)

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

Предыдущее
От: Laurent ROCHE
Дата:
Сообщение: Re : pg_dump auto login
Следующее
От: Gregory Stark
Дата:
Сообщение: Re: deadlock detected, only selects (not select-for-update)