Re: POC, WIP: OR-clause support for indexes

Поиск
Список
Период
Сортировка
От Andrei Lepikhov
Тема Re: POC, WIP: OR-clause support for indexes
Дата
Msg-id fdba7c11-4f3e-43d3-ac89-cab82aef0b6f@gmail.com
обсуждение исходный текст
Ответ на Re: POC, WIP: OR-clause support for indexes  (Alexander Korotkov <aekorotkov@gmail.com>)
Ответы Re: POC, WIP: OR-clause support for indexes
Список pgsql-hackers
On 1/27/25 16:50, Alexander Korotkov wrote:
> I expressed my point on this in [1].  We generally greedy about index 
> quals and there is no logic which prevent us from using a clause and 
> index qual because of its cost.  And there are many cases when this 
> causes regressions before d4378c0005.  One of examples from [1].
Ok,
Generally, I don't concern myself with the evaluation of individual 
subplans. As you mentioned, it should be a rare occurrence when this 
becomes important. My main concern is the shift in frequency of 
evaluations during execution for various reasons.
For example:

qsort(matches, n, sizeof(OrArgIndexMatch), or_arg_index_match_cmp);

To fit an index, the order of elements in the target array of the 
`ScalarArrayOpExpr` may change compared to the initial list of OR 
expressions. If there are indexes that cover the same set of columns but 
in reverse order, this could potentially alter the position of a 
Subplan. However, I believe this is a rare case; it is supported by the 
initial OR path and should be acceptable.

So, I do not have any further objections at this time.

-- 
regards, Andrei Lepikhov



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