Re: Batch TIDs lookup in ambulkdelete

Masahiko Sawada <sawada.mshk@gmail.com>

From: Masahiko Sawada <sawada.mshk@gmail.com>
To: Peter Geoghegan <pg@bowt.ie>
Cc: John Naylor <johncnaylorls@gmail.com>, PostgreSQL-development <pgsql-hackers@postgresql.org>
Date: 2025-06-09T19:29:31Z
Lists: pgsql-hackers

Attachments

On Fri, Jun 6, 2025 at 4:28 PM Peter Geoghegan <pg@bowt.ie> wrote:
>
> On Fri, Jun 6, 2025 at 6:58 PM Masahiko Sawada <sawada.mshk@gmail.com> wrote:
> > Agreed. Given the above test results, it's unlikely always sorting the
> > array helps speedups.
>
> Did you try specializing the sort? In my experience, it makes a big difference.

Thank you for the suggestion. I've done the same performance test with
the suggestion. The difference seems to be within an acceptable range.

                  HEAD         PATCHED    DIFF
case-6:     3,320 ms      3,374 ms    101.63%

I've attached the patches I used for this evaluation.

Regards,

-- 
Masahiko Sawada
Amazon Web Services: https://aws.amazon.com