Re: Remove extra Sort node above a btree-compatible Index Scan

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Remove extra Sort node above a btree-compatible Index Scan
Дата
Msg-id 2681345.1740721397@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Remove extra Sort node above a btree-compatible Index Scan  (Alexandra Wang <alexandra.wang.oss@gmail.com>)
Список pgsql-hackers
Alexandra Wang <alexandra.wang.oss@gmail.com> writes:
> I’ve attached a patch that removes this unnecessary Sort node for
> B-tree-compatible indexes.

This does not look right at all.  You can't just ignore the opfamily
etc. while deciding whether two pathkeys represent the same sort
ordering, as you did in create_mergejoin_plan().  I don't like
pathkeys_have_same_sortop() either.  The pathkey data structures
were designed to let pointer comparison be sufficient for deciding
whether pathkeys are equivalent: see the "canonical pathkey" stuff
in pathkeys.c.  I think that this patch may be band-aiding over some
breakage of that concept, but you've not provided enough context to
figure out what the underlying problem is.

            regards, tom lane



В списке pgsql-hackers по дате отправления: