Re: [HACKERS] Surjective functional indexes
От | Andres Freund |
---|---|
Тема | Re: [HACKERS] Surjective functional indexes |
Дата | |
Msg-id | 20170525170715.hhptla6ks3bjxqxc@alap3.anarazel.de обсуждение исходный текст |
Ответ на | Re: [HACKERS] Surjective functional indexes (Tom Lane <tgl@sss.pgh.pa.us>) |
Список | pgsql-hackers |
On 2017-05-25 12:37:40 -0400, Tom Lane wrote: > Konstantin Knizhnik <k.knizhnik@postgrespro.ru> writes: > > My proposal is to check value of function for functional indexes instead > > of just comparing set of effected attributes. > > Obviously, for some complex functions it may have negative effect on > > update speed. > > This is why I have added "surjective" option to index. > > This seems overcomplicated. We would have to compute the function > value at some point anyway. Can't we refactor to do that earlier? Yea, that'd be good. Especially if we were to compute the expressions for all indexes in one go - doing that in other places (e.g. aggregate transition values) yielded a good amount of speedup. It'd be even larger if we get JITing of expressions. It seems feasible to do so for at least the nodeModifyTable case. I wonder if there's a chance to use such logic alsofor HOT update considerations, but that seems harder to do without larger layering violations. - Andres
В списке pgsql-hackers по дате отправления: