Re: [BUGS] BUG #14642: Excessive sorting node appears in the plan
От | David Rowley |
---|---|
Тема | Re: [BUGS] BUG #14642: Excessive sorting node appears in the plan |
Дата | |
Msg-id | CAKJS1f9WFSoyGrT=qMaiMwvnu2tsy2VPqQUtC=Q++nYSZt7hrA@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: [BUGS] BUG #14642: Excessive sorting node appears in the plan (Tom Lane <tgl@sss.pgh.pa.us>) |
Список | pgsql-bugs |
On 5 May 2017 at 02:12, Tom Lane <tgl@sss.pgh.pa.us> wrote: > bashtanov@imap.cc writes: >> Do blackbox-style subplans, such as subqueries with grouping, share only the >> resulting stream order info with the enclosing query, not the equivalence >> classes? > > Yes, see convert_subquery_pathkeys(). Not as a back-patchable fix, but I wonder if we couldn't improve this situation by having pathkey_is_redundant() not throw pathkeys with a constant in their eclass away, but rather keep these around as "no-op pathkeys". It would make the logic in compare_pathkeys() a bit more tricky, but maybe it could be manageable if we kept the no-op pathkeys in a separate list, and only lookup the pathkey in that list when the pathkeys being compared are not the same. If it's in the no-op list, then we can skip to the next path key after the no-op one. Although I'm not quite sure in what cases PATHKEYS_EQUAL would be returned. -- David Rowley http://www.2ndQuadrant.com/PostgreSQL Development, 24x7 Support, Training & Services -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs
В списке pgsql-bugs по дате отправления: