From: | Peter Eisentraut <peter(at)eisentraut(dot)org> |
---|---|
To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
Subject: | pgsql: Optimize update of tables with generated columns |
Date: | 2020-02-17 15:14:11 |
Message-ID: | E1j3i67-0002Nb-07@gemulon.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
Optimize update of tables with generated columns
When updating a table row with generated columns, only recompute those
generated columns whose base columns have changed in this update and
keep the rest unchanged. This can result in a significant performance
benefit. The required information was already kept in
RangeTblEntry.extraUpdatedCols; we just have to make use of it.
Reviewed-by: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
Discussion: https://www.postgresql.org/message-id/flat/b05e781a-fa16-6b52-6738-761181204567(at)2ndquadrant(dot)com
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/c6679e4fca21d253ced84c51ac1a31c1b2aec72f
Modified Files
--------------
src/backend/commands/copy.c | 2 +-
src/backend/executor/execReplication.c | 4 ++--
src/backend/executor/nodeModifyTable.c | 37 ++++++++++++++++++++++++++++------
src/include/executor/nodeModifyTable.h | 2 +-
src/include/nodes/execnodes.h | 3 +++
5 files changed, 38 insertions(+), 10 deletions(-)
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2020-02-17 23:40:28 | pgsql: Teach pg_dump to dump comments on RLS policy objects. |
Previous Message | Peter Eisentraut | 2020-02-17 15:14:10 | pgsql: Fill in extraUpdatedCols in logical replication |