Re: [HACKERS] Slow count(*) again...

Поиск
Список
Период
Сортировка
От David Wilson
Тема Re: [HACKERS] Slow count(*) again...
Дата
Msg-id AANLkTi=A-70EgJ8yWDCn4hbyCaA0nFJFA3+zedan=nLS@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [HACKERS] Slow count(*) again...  (Robert Haas <robertmhaas@gmail.com>)
Ответы Re: [HACKERS] Slow count(*) again...  (Samuel Gendler <sgendler@ideasculptor.com>)
Список pgsql-performance


On Thu, Feb 3, 2011 at 6:05 PM, Robert Haas <robertmhaas@gmail.com> wrote:

If you want to randomly pick 10,000 rows out of all the rows that are
going to be inserted in the table without knowing in advance how many
there will be, how do you do that?

Reservoir sampling, as the most well-known option: http://en.wikipedia.org/wiki/Reservoir_sampling

--
- David T. Wilson
david.t.wilson@gmail.com

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

Предыдущее
От: Scott Marlowe
Дата:
Сообщение: Re: getting the most of out multi-core systems for repeated complex SELECT statements
Следующее
От: Samuel Gendler
Дата:
Сообщение: Re: [HACKERS] Slow count(*) again...