Re: Add memory/disk usage for WindowAgg nodes in EXPLAIN

Поиск
Список
Период
Сортировка
От Tatsuo Ishii
Тема Re: Add memory/disk usage for WindowAgg nodes in EXPLAIN
Дата
Msg-id 20240916.211317.396133556663707937.ishii@postgresql.org
обсуждение исходный текст
Ответ на Re: Add memory/disk usage for WindowAgg nodes in EXPLAIN  (Ashutosh Bapat <ashutosh.bapat.oss@gmail.com>)
Ответы Re: Add memory/disk usage for WindowAgg nodes in EXPLAIN
Список pgsql-hackers
Hi Ashutosh,

Thank you for the review.

> Thanks. This will do. Is there a way to force the larger partition to
> be computed first? That way we definitely know that the last
> computation was done when all the tuples in the tuplestore were in
> memory.

Not sure if there's any way to force it in the SQL standard.  However
in term of implementation, PostgreSQL sorts the function
(generate_series) scan result using a sort key "a.n < 3", which
results in rows being >= 2 first (as false == 0), then rows being < 3
(as true == 1). So unless PostgreSQL changes the way to sort boolean
data type, I think the result should be stable.

Best reagards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp



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