Re: Performance of ORDER BY RANDOM to select random rows?

Поиск
Список
Период
Сортировка
От hubert depesz lubaczewski
Тема Re: Performance of ORDER BY RANDOM to select random rows?
Дата
Msg-id 20130808085517.GA26014@depesz.com
обсуждение исходный текст
Ответ на Performance of ORDER BY RANDOM to select random rows?  (Victor Hooi <victorhooi@yahoo.com>)
Список pgsql-general
On Thu, Aug 08, 2013 at 12:01:17PM +1000, Victor Hooi wrote:
> I'm just wondering if this is still the case?

Yes. Order by random() is and, most likely, will be slow. Not sure if
there is any engine that could make it fast.

> I just ran those benchmarks on my system (Postgres 9.2.4), and using ORDERY
> BY RANDOM did not seem substantially to generating random integers in
> Python and picking those out (and handling non-existent rows).

I think you accidentally a word.

depesz

--
The best thing about modern society is how easy it is to avoid contact with it.
                                                             http://depesz.com/


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

Предыдущее
От: Alban Hertroys
Дата:
Сообщение: Re: How to prevent clear screen when query finish ?
Следующее
От: AI Rumman
Дата:
Сообщение: setting high value for wal_keep_segments