Re: POC: GROUP BY optimization

From: "Andrey V(dot) Lepikhov" <a(dot)lepikhov(at)postgrespro(dot)ru>
To: Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: POC: GROUP BY optimization
Date: 2021-12-28 08:47:35
Message-ID: 16e9e7c3-7f6e-b3a8-ca74-38590631d9a2@postgrespro.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 9/2/20 9:12 PM, Tomas Vondra wrote:
> We could simply use the input "tuples" value here, and then divide the
> current and previous estimate to calculate the number of new groups.

Performing a review of this patch I made a number of changes (see
cleanup.txt). Maybe it will be useful.
As I see, the code, which implements the main idea, is quite stable.
Doubts localized in the cost estimation routine. Maybe try to finish
this work by implementing an conservative strategy to a cost estimation
of sorting?

--
regards,
Andrey Lepikhov
Postgres Professional

Attachment Content-Type Size
cleanup.txt text/plain 5.5 KB
group-by-reorder-20211228.patch text/x-patch 98.9 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Pavel Stehule 2021-12-28 08:50:39 Re: sequences vs. synchronous replication
Previous Message Sascha Kuhl 2021-12-28 08:28:30 Re: sequences vs. synchronous replication