Re: Proposal: scan key push down to heap [WIP]

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: Proposal: scan key push down to heap [WIP]
Дата
Msg-id CA+TgmoZz8u-_2p6H8cuGJtJnCyg9vG8QPShrU4mF-Ap8o-T9Hw@mail.gmail.com
обсуждение исходный текст
Ответ на Proposal: scan key push down to heap [WIP]  (Dilip Kumar <dilipbalaut@gmail.com>)
Ответы Re: Proposal: scan key push down to heap [WIP]  (Dilip Kumar <dilipbalaut@gmail.com>)
Список pgsql-hackers
On Tue, Oct 11, 2016 at 4:57 AM, Dilip Kumar <dilipbalaut@gmail.com> wrote:
> This patch will extract the expression from qual and prepare the scan
> keys. Currently in POC version I have only supported  "var OP const"
> type of qual, because these type of quals can be pushed down using
> existing framework.
>
> Purpose of this work is to first implement the basic functionality and
> analyze the results. If results are good then we can extend it for
> other type of expressions.
>
> However in future when we try to expand the support for complex
> expressions, then we need to be very careful while selecting
> pushable expression. It should not happen that we push something very
> complex, which may cause contention with other write operation (as
> HeapKeyTest is done under page lock).

I seriously doubt that this should EVER be supported for anything
other than "var op const", and even then only for very simple
operators.  For example, texteq() is probably too complicated, because
it might de-TOAST, and that might involve doing a LOT of work while
holding the buffer content lock.  But int4eq() would be OK.

Part of the trick if we want to make this work is going to be figuring
out how we'll identify which operators are safe.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



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

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: Is it time to kill support for very old servers?
Следующее
От: Amit Langote
Дата:
Сообщение: Typo in foreign.h