Faster `&&` intersection for sorted arrays - Mailing list pgsql-general

From Adrian Garcia Badaracco
Subject Faster `&&` intersection for sorted arrays
Date
Msg-id CAE8z92HXNko026zBe++fXr7_1tDCfFEJyiuUEmppYvUD253U8A@mail.gmail.com
Whole thread Raw
List pgsql-general
I was wondering if I could do better than `&&` for sorted arrays by doing binary search and came up with some really interesting results.
I only did a quick spin of this, an LLM generated most of the code after I gave it the algorithm and I don't plan on using it in production (I'm going to normalize my schema instead) but I wanted to share this in case it's useful to anyone.

https://gist.github.com/adriangb/1b68bb2e408423ddcb90fb0136a00ba8

pgsql-general by date:

Previous
From: Adrian Klaver
Date:
Subject: Re: Grants not working on partitions
Next
From: Lok P
Date:
Subject: Re: Grants not working on partitions