Re: optimisation? collation "C" sorting for GroupAggregate for all deterministic collations

From: Corey Huinker <corey(dot)huinker(at)gmail(dot)com>
To: James Coleman <jtc331(at)gmail(dot)com>
Cc: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, Maxim Ivanov <hi(at)yamlcoder(dot)me>, "pgsql-hackers(at)lists(dot)postgresql(dot)org" <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: optimisation? collation "C" sorting for GroupAggregate for all deterministic collations
Date: 2020-03-23 01:00:41
Message-ID: CADkLM=dhELi6fK8jbPVzfwwnzO729zDzTt=mVax9tJybr0=3_Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

>
> Perhaps this is what you mean by "deterministic", but isn't it
> possible for some collations to treat multiple byte sequences as equal
> values? And those multiple byte sequences wouldn't necessarily occur
> sequentially in C collation, so it wouldn't be possible to work around
> that by having the grouping node use one collation but the sorting
> node use the C one.
>
> If my memory is incorrect, then this sounds like an intriguing idea.
>
>
I could see the value in a hash aggregate on C-collation that then passes
itself as a partial aggregate up to another step which applies the
collation and then finalizes the aggregation before sorting

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message James Coleman 2020-03-23 02:05:50 Re: [PATCH] Incremental sort (was: PoC: Partial sort)
Previous Message Andreas Karlsson 2020-03-23 00:58:14 Re: ssl passphrase callback