mirror of
https://git.postgresql.org/git/postgresql.git
synced 2024-09-05 00:27:21 +02:00
doc: clarify when expression indexes evaluate their expressions
Only non-HOT updates evaluate the index expression. Reported-by: Chris Lowder Discussion: https://postgr.es/m/163967385701.26064.15365003480975321072@wrigleys.postgresql.org Backpatch-through: 10
This commit is contained in:
parent
1a0ef5e2cc
commit
f163cc8f4d
@ -725,8 +725,8 @@ CREATE INDEX people_names ON people ((first_name || ' ' || last_name));
|
|||||||
|
|
||||||
<para>
|
<para>
|
||||||
Index expressions are relatively expensive to maintain, because the
|
Index expressions are relatively expensive to maintain, because the
|
||||||
derived expression(s) must be computed for each row upon insertion
|
derived expression(s) must be computed for each row insertion
|
||||||
and whenever it is updated. However, the index expressions are
|
and non-HOT update. However, the index expressions are
|
||||||
<emphasis>not</emphasis> recomputed during an indexed search, since they are
|
<emphasis>not</emphasis> recomputed during an indexed search, since they are
|
||||||
already stored in the index. In both examples above, the system
|
already stored in the index. In both examples above, the system
|
||||||
sees the query as just <literal>WHERE indexedcolumn = 'constant'</literal>
|
sees the query as just <literal>WHERE indexedcolumn = 'constant'</literal>
|
||||||
|
Loading…
Reference in New Issue
Block a user