Re: short circuit suggestion in find_hash_columns()

From: David Rowley <dgrowleyml(at)gmail(dot)com>
To: Zhihong Yu <zyu(at)yugabyte(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: short circuit suggestion in find_hash_columns()
Date: 2021-07-09 15:28:38
Message-ID: CAApHDvqSCvJrc0XQcuqkBFkTue=oKVeDCqBib3DOwd6FguyCcA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sat, 10 Jul 2021 at 03:15, Zhihong Yu <zyu(at)yugabyte(dot)com> wrote:
> I was looking at find_hash_columns() in nodeAgg.c
>
> It seems the first loop tries to determine the max column number needed, along with whether all columns are needed.
>
> The loop can be re-written as shown in the patch.

This runs during ExecInitAgg(). Do you have a test case where you're
seeing any performance gains from this change?

David

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message David Rowley 2021-07-09 15:35:29 Re: enable_resultcache confusion
Previous Message David Rowley 2021-07-09 15:24:33 Re: Record a Bitmapset of non-pruned partitions