| From: | Alena Rybakina <a(dot)rybakina(at)postgrespro(dot)ru> |
|---|---|
| To: | Alexander Korotkov <aekorotkov(at)gmail(dot)com> |
| Cc: | Pavel Borisov <pashkin(dot)elfe(at)gmail(dot)com>, Andrei Lepikhov <lepihov(at)gmail(dot)com>, Alexander Lakhin <exclusion(at)gmail(dot)com>, pgsql-hackers(at)lists(dot)postgresql(dot)org |
| Subject: | Re: POC, WIP: OR-clause support for indexes |
| Date: | 2025-03-28 12:31:31 |
| Message-ID: | b83dd728-3e3f-4efc-8086-b181f27dae86@postgrespro.ru |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On 28.03.2025 15:23, Alena Rybakina wrote:
>
> I agree with your code in general, but to be honest, double qsort
> confused me a little.
>
> I understood why it is needed - we need to sort the elements so that
> they stand next to each other if they can be assigned to the same
> group, and then sort the groups themselves according to the set
> identifier.
>
> I may be missing something, but in the worst case we can get the
> complexity of qsort O(n^2), right? And I saw the letter where you
> mentioned this, but it is possible to use mergesort algorithm instead
> of qsort, which in the worst case gives n * O(n) complexity?
>
No, sorry, I was wrong here and it is impossible to rewrite it this way.
I apologize, I agree with your code.
--
Regards,
Alena Rybakina
Postgres Professional
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Andres Freund | 2025-03-28 12:54:42 | Re: AIO v2.5 |
| Previous Message | Ashutosh Bapat | 2025-03-28 12:27:50 | Re: Test to dump and restore objects left behind by regression |