On 3/28/25 12:59, Alexander Korotkov wrote:
On Fri, Mar 28, 2025 at 1:32 PM Andrei Lepikhov <lepi...@gmail.com> wrote: I don't think this is going to be CPU-consuming. I don't think this is going to be measurable. This patch introduces one additional pass over array of OrArgIndexMatch'es, and qsort of them. I think I've seen places where we spend quadratic time over the number of OR-clauses. Even calls of match_index_to_operand() for every clause and every index look way more expensive.
Ok, I have no more objections.
I think my patch gives better determinism too. For instance, output order doesn't depend on order of indexes in rel->indexlist.
Nice! -- regards, Andrei Lepikhov