Re: Should we optimize the `ORDER BY random() LIMIT x` case?

Поиск
Список
Период
Сортировка
От Nico Williams
Тема Re: Should we optimize the `ORDER BY random() LIMIT x` case?
Дата
Msg-id aCezOeKRnvVUHml1@ubby
обсуждение исходный текст
Ответ на Re: Should we optimize the `ORDER BY random() LIMIT x` case?  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Fri, May 16, 2025 at 09:01:50AM -0400, Tom Lane wrote:
> Seems to me the obvious answer is to extend TABLESAMPLE (or at least, some
> of the tablesample methods) to allow it to work on a subquery.

The key here is that we need one bit of state between rows: the count of
rows seen so far.



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