Re: Performance killed with FDW when using CAST.

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Performance killed with FDW when using CAST.
Дата
Msg-id 28623.1555509730@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Performance killed with FDW when using CAST.  (Thomas Kellerer <spam_eater@gmx.net>)
Ответы Re: Performance killed with FDW when using CAST.  (Jorge Torralba <jorge.torralba@gmail.com>)
Re: Performance killed with FDW when using CAST.  (Jorge Torralba <jorge.torralba@gmail.com>)
Re: Performance killed with FDW when using CAST.  (Jorge Torralba <jorge.torralba@gmail.com>)
Список pgsql-admin
Thomas Kellerer <spam_eater@gmx.net> writes:
> Laurenz Albe schrieb am 17.04.2019 um 07:03:
>> After debugging into this, it seems that the hstore operator -> cannot
>> be pushed down because of collation problems.

> Do you happen to know if the JSONB operator -> (or ->>) can be pushed down? 

A bit of experimentation says that jsonb -> integer can be pushed down,
but not any of the variants involving a text fieldname or result.
Presumably this is because of the heuristic that says not to push down
a collation that didn't arise from the remote column.  jsonb -> text
isn't really collation-sensitive, of course, but postgres_fdw has no
good way to know that, since the core code (outside of that operator
itself) doesn't know it either.  The assumption is that any function
with at least one input of a collatable type is collation-sensitive.
Here you're getting a default collation from the text literal, and
postgres_fdw doesn't want to assume that the remote end would choose
the same collation.

            regards, tom lane



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Too many serialization errors in production
Следующее
От: Jorge Torralba
Дата:
Сообщение: Re: Performance killed with FDW when using CAST.