Re: Speeding up ruleutils' name de-duplication code, redux

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: David Rowley <dgrowleyml(at)gmail(dot)com>
Cc: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Speeding up ruleutils' name de-duplication code, redux
Date: 2024-09-10 20:36:00
Message-ID: 3657865.1726000560@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

David Rowley <dgrowleyml(at)gmail(dot)com> writes:
> On Wed, 11 Sept 2024 at 03:06, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>> We could accomplish what you suggest by re-ordering the calls so that
>> we build the hash table before enlarging the array. 0001 attached
>> is the same as before (modulo line number changes from being rebased
>> up to HEAD) and then 0002 implements this idea on top. On the whole
>> though I find 0002 fairly ugly and would prefer to stick to 0001.
>> I really doubt that scanning any newly-created column positions is
>> going to take long enough to justify intertwining things like this.

> I'm fine with that. I did test the performance with and without
> v2-0002 and the performance is just a little too noisy to tell. Both
> runs I did with v2-0002, it was slower, so I agree it's not worth
> making the code uglier for.
> I've no more comments. Looks good.

Thanks for the review! I'll go push just 0001.

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message David E. Wheeler 2024-09-10 20:48:27 Re: Document DateStyle effect on jsonpath string()
Previous Message David Rowley 2024-09-10 20:33:59 Re: Speeding up ruleutils' name de-duplication code, redux