Re: Batch TIDs lookup in ambulkdelete

2025-06-11 Thread Masahiko Sawada
On Mon, Jun 9, 2025 at 4:03 AM John Naylor wrote: > > On Sat, Jun 7, 2025 at 4:34 AM Masahiko Sawada wrote: > > BTW I found that the constant 'maxblkno' in test_tidstore.sql actually > > equals to InvalidBlockNumber, but not MaxBlockNumber. I think it > > doesn't make sense that TidStore uses Inv

Re: Batch TIDs lookup in ambulkdelete

2025-06-09 Thread Matheus Alcantara
On 06/06/25 18:34, Masahiko Sawada wrote: > > Thank you for the report. With the 0001 and 0002 patches, I got a > SEGV. I've fixed this issue in the attached updated version patches. > I've confirmed that the patches pass CI tests but I'm not sure it > fixes the shared memory segment leak problem y

Re: Batch TIDs lookup in ambulkdelete

2025-06-09 Thread Masahiko Sawada
On Fri, Jun 6, 2025 at 4:28 PM Peter Geoghegan wrote: > > On Fri, Jun 6, 2025 at 6:58 PM Masahiko Sawada 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 > differenc

Re: Batch TIDs lookup in ambulkdelete

2025-06-09 Thread John Naylor
On Sat, Jun 7, 2025 at 4:34 AM Masahiko Sawada wrote: > BTW I found that the constant 'maxblkno' in test_tidstore.sql actually > equals to InvalidBlockNumber, but not MaxBlockNumber. I think it > doesn't make sense that TidStore uses InvalidBlockNumber as the key. > The attached 0001 patch fixes i

Re: Batch TIDs lookup in ambulkdelete

2025-06-07 Thread Junwang Zhao
On Sat, Jun 7, 2025 at 8:46 PM Junwang Zhao wrote: > > Hi Masahiko, > > On Sat, Jun 7, 2025 at 5:34 AM Masahiko Sawada wrote: > > > > On Tue, May 13, 2025 at 2:26 PM Matheus Alcantara > > wrote: > > > > > > Hi, > > > > > > On 30/04/25 19:36, Masahiko Sawada wrote: > > > > Here are the summary of

Re: Batch TIDs lookup in ambulkdelete

2025-06-07 Thread Junwang Zhao
Hi Masahiko, On Sat, Jun 7, 2025 at 5:34 AM Masahiko Sawada wrote: > > On Tue, May 13, 2025 at 2:26 PM Matheus Alcantara > wrote: > > > > Hi, > > > > On 30/04/25 19:36, Masahiko Sawada wrote: > > > Here are the summary of each attached patch: > > > > > > 0001: Introduce TIdStoreIsMemberMulti() w

Re: Batch TIDs lookup in ambulkdelete

2025-06-06 Thread Peter Geoghegan
On Fri, Jun 6, 2025 at 6:58 PM Masahiko Sawada 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. -- Peter Geoghegan

Re: Batch TIDs lookup in ambulkdelete

2025-06-06 Thread Masahiko Sawada
On Sun, Jun 1, 2025 at 11:01 PM John Naylor wrote: > > On Thu, May 1, 2025 at 5:36 AM Masahiko Sawada wrote: > > > HEAD PATCHEDDIFF > > case-1: 3,021 ms 2.818 ms93.29% > > case-2: 5, 697 ms 5.545 ms97.34% > > case-3: 2,833 ms 2.790 m

Re: Batch TIDs lookup in ambulkdelete

2025-06-06 Thread Masahiko Sawada
On Tue, May 13, 2025 at 2:26 PM Matheus Alcantara wrote: > > Hi, > > On 30/04/25 19:36, Masahiko Sawada wrote: > > Here are the summary of each attached patch: > > > > 0001: Introduce TIdStoreIsMemberMulti() where we can do IsMember check > > for multiple TIDs in one function call. If the given TI

Re: Batch TIDs lookup in ambulkdelete

2025-06-01 Thread John Naylor
On Thu, May 1, 2025 at 5:36 AM Masahiko Sawada wrote: > HEAD PATCHEDDIFF > case-1: 3,021 ms 2.818 ms93.29% > case-2: 5, 697 ms 5.545 ms97.34% > case-3: 2,833 ms 2.790 ms98.48% > case-4: 2,564 ms 2.279 ms88.86% > case

Re: Batch TIDs lookup in ambulkdelete

2025-05-13 Thread Matheus Alcantara
Hi, On 30/04/25 19:36, Masahiko Sawada wrote: > Here are the summary of each attached patch: > > 0001: Introduce TIdStoreIsMemberMulti() where we can do IsMember check > for multiple TIDs in one function call. If the given TIDs are sorted > (at least in block number), we can save radix tree lookup