Re: Query Performance Degradation Due to Partition Scan Order – PostgreSQL v17.6
От | David Rowley |
---|---|
Тема | Re: Query Performance Degradation Due to Partition Scan Order – PostgreSQL v17.6 |
Дата | |
Msg-id | CAApHDvpdkx6UUuSYADfARyf_DdQYUWdBL+OB0GCnA2BaB0Ea1Q@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: Query Performance Degradation Due to Partition Scan Order – PostgreSQL v17.6 (Andrei Lepikhov <lepihov@gmail.com>) |
Список | pgsql-hackers |
On Wed, 10 Sept 2025 at 19:41, Andrei Lepikhov <lepihov@gmail.com> wrote: > > On 10/9/2025 00:57, David Rowley wrote: > > ... However, it's not all that clear to me how often someone would > > have a LIMIT without an ORDER BY, as effectively there's nothing there > > to determine which rows your query returns, and there's no flexibility > > to change which subpaths are first in Append/MergeAppend paths created > > in generate_orderedappend_paths(). > Of course, it should be applied to an Append without pathkeys. > However, I still recall user cases where the subtree scan is stopped, > even without any limit, simply because MergeJoin has reached the end of > the inner/outer subtree or in the case of semi- or anti-joins. I wonder > if other cases may exist.> Cursors and nested loop semi joins are the only thing that come to mind for me. I don't see how there could be a Merge Join on an unordered Append path. Merge Join inputs need to be ordered (and have PathKeys). David
В списке pgsql-hackers по дате отправления: