On 22/11/2024 06:27, Giacchino, Luca wrote:
> We’d appreciate feedback on this approach. In the meantime, we will
> complete the patch to share. We also plan to extend SIMD-based sort to
> tuple sort in the future.
Nice! I continually see performance reports when sorting and group order
impact performance. Because of that, efforts have been made to optimise
sorts with recombination of clause order [1,2]. It would be nice to
review your Sort operator optimisation. I hope, it might improve
performance of the cases provided in these threads.
[1] POC: GROUP BY optimization
https://www.postgresql.org/message-id/flat/7c79e6a5-8597-74e8-0671-1c39d124c9d6%40sigaev.ru
[2] Consider the number of columns in the sort cost model
https://www.postgresql.org/message-id/flat/8742aaa8-9519-4a1f-91bd-364aec65f5cf%40gmail.com
--
regards, Andrei Lepikhov