Re: Use of additional index columns in rows filtering

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Use of additional index columns in rows filtering
Дата
Msg-id 1597854.1690224141@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Use of additional index columns in rows filtering  (Jeff Davis <pgsql@j-davis.com>)
Список pgsql-hackers
Jeff Davis <pgsql@j-davis.com> writes:
> On Mon, 2023-07-24 at 13:58 -0400, Tom Lane wrote:
>> Please do not put in any code that assumes that restriction clause
>> order is preserved, or encourages users to think it is.

> Agreed. I didn't mean to add any extra guarantee of preserving clause
> order; just to follow the current way order_qual_clauses() works, which
> has a comment saying:
> "So we just order by security level then estimated per-tuple cost,
> being careful not to change the order when (as is often the case) the
> estimates are identical."
> I assumed that the reason for "being careful" above was to not
> unnecessarily override how the user writes the qual clauses, but
> perhaps there's another reason?

I think the point was just to not make any unnecessary behavioral
changes from the way things were before we added that sorting logic.
But there are other places that will result in clause ordering changes,
plus there's the whole business of possibly-intermixed restriction and
join clauses.

            regards, tom lane



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

Предыдущее
От: Jeff Davis
Дата:
Сообщение: Re: Use of additional index columns in rows filtering
Следующее
От: Aleksander Alekseev
Дата:
Сообщение: [PATCH] Check more invariants during syscache initialization