Re: POC: GROUP BY optimization - Mailing list pgsql-hackers

From Robert Haas
Subject Re: POC: GROUP BY optimization
Date
Msg-id CA+TgmoZHC=Lp83eucToAwNzoMeiaRMeTXqhPeGSquGLuGRgmTg@mail.gmail.com
Whole thread Raw
In response to Re: POC: GROUP BY optimization  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Fri, Jan 26, 2024 at 10:38 AM Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Sadly, that's not a small task:
>
> * We'd need to put effort into assigning more realistic procost
> values --- preferably across the board, not just comparison functions.
> As long as all the comparison functions have procost 1.0, you're
> just flying blind.
>
> * As you mentioned, there'd need to be some accounting for the
> likely size of varlena inputs, and especially whether they might
> be toasted.
>
> * cost_sort knows nothing of the low-level sort algorithm improvements
> we've made in recent years, such as abbreviated keys.
>
> That's a lot of work, and I think it has to be done before we try
> to build infrastructure on top, not afterwards.

OK, that makes sense to me. Thanks.

--
Robert Haas
EDB: http://www.enterprisedb.com



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: POC: GROUP BY optimization
Next
From: "David G. Johnston"
Date:
Subject: Re: Add new error_action COPY ON_ERROR "log"