Re: [HACKERS] Surjective functional indexes

Поиск
Список
Период
Сортировка
От Konstantin Knizhnik
Тема Re: [HACKERS] Surjective functional indexes
Дата
Msg-id 29009e90-fd29-b67b-11b9-cb737d03635b@postgrespro.ru
обсуждение исходный текст
Ответ на Re: [HACKERS] Surjective functional indexes  (Christoph Berg <myon@debian.org>)
Ответы Re: [HACKERS] Surjective functional indexes  (Simon Riggs <simon@2ndquadrant.com>)
Список pgsql-hackers

On 13.09.2017 13:14, Christoph Berg wrote:
> Re: Konstantin Knizhnik 2017-09-13 <2393c4b3-2ec4-dc68-4ea9-670597b561fe@postgrespro.ru>
>>
>> On 13.09.2017 10:51, Christoph Berg wrote:
>>> Re: Konstantin Knizhnik 2017-09-01 <f530ede0-1bf6-879c-c362-34325514f692@postgrespro.ru>
>>>> +       Functional index is based on on projection function: function which extract subset of its argument.
>>>> +       In mathematic such functions are called non-injective. For injective function if any attribute used in the
indexed
>>>> +       expression is changed, then value of index expression is also changed.
>>> This is Just Wrong. I still think what you are doing here doesn't have
>>> anything to do with the function being injective or not.
>> Sorry, can you please explain what is wrong?
> I don't get why you are reasoning about "projection" ->
> "non-injective" -> "injective". Can't you try to explain what this
> functionality is about without abusing math terms that just mean
> something else in the rest of the world?

I tried to explain it in my previous e-mail. In most cases (it is just 
my filling, may be it is wrong), functional indexes are built for some 
complex types, like JSON, arrays, structs,...
and index expression extracts some components of this compound value. It 
means that even if underlying column is changes, there is good chance 
that value of index function is not changed. So there is no need to 
update index and we can use HOT. It allows to several time increase 
performance.

The only reason of all this discussion about terms is that I need to 
choose name for correspondent index option.
Simon think that we do not need this option at all. In this case we 
should not worry about right term.From my point of view, "projection" is quite clear notion and not only 
for mathematics. It is also widely used in IT and especially in DBMSes.

-- 

Konstantin Knizhnik
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company



-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

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

Предыдущее
От: Amit Khandekar
Дата:
Сообщение: Re: [HACKERS] expanding inheritance in partition bound order
Следующее
От: Ashutosh Sharma
Дата:
Сообщение: Re: [HACKERS] Getting error message with latest PG source on Windows.