forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitc6679e4
committed
Optimize update of tables with generated columns
When updating a table row with generated columns, only recompute thosegenerated columns whose base columns have changed in this update andkeep the rest unchanged. This can result in a significant performancebenefit. The required information was already kept inRangeTblEntry.extraUpdatedCols; we just have to make use of it.Reviewed-by: Pavel Stehule <pavel.stehule@gmail.com>Discussion:https://www.postgresql.org/message-id/flat/b05e781a-fa16-6b52-6738-761181204567@2ndquadrant.com1 parentad3ae64 commitc6679e4
File tree
5 files changed
+38
-10
lines changed- src
- backend
- commands
- executor
- include
- executor
- nodes
5 files changed
+38
-10
lines changedLines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
3222 | 3222 |
| |
3223 | 3223 |
| |
3224 | 3224 |
| |
3225 |
| - | |
| 3225 | + | |
3226 | 3226 |
| |
3227 | 3227 |
| |
3228 | 3228 |
| |
|
Lines changed: 2 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
419 | 419 |
| |
420 | 420 |
| |
421 | 421 |
| |
422 |
| - | |
| 422 | + | |
423 | 423 |
| |
424 | 424 |
| |
425 | 425 |
| |
| |||
485 | 485 |
| |
486 | 486 |
| |
487 | 487 |
| |
488 |
| - | |
| 488 | + | |
489 | 489 |
| |
490 | 490 |
| |
491 | 491 |
| |
|
Lines changed: 31 additions & 6 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
246 | 246 |
| |
247 | 247 |
| |
248 | 248 |
| |
249 |
| - | |
| 249 | + | |
250 | 250 |
| |
251 | 251 |
| |
252 | 252 |
| |
| |||
269 | 269 |
| |
270 | 270 |
| |
271 | 271 |
| |
| 272 | + | |
272 | 273 |
| |
273 | 274 |
| |
274 | 275 |
| |
275 | 276 |
| |
276 | 277 |
| |
277 | 278 |
| |
278 | 279 |
| |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
279 | 295 |
| |
280 | 296 |
| |
281 | 297 |
| |
282 | 298 |
| |
283 | 299 |
| |
284 | 300 |
| |
| 301 | + | |
285 | 302 |
| |
286 | 303 |
| |
287 | 304 |
| |
288 | 305 |
| |
289 | 306 |
| |
290 | 307 |
| |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
291 | 315 |
| |
292 | 316 |
| |
293 | 317 |
| |
| |||
300 | 324 |
| |
301 | 325 |
| |
302 | 326 |
| |
303 |
| - | |
| 327 | + | |
| 328 | + | |
304 | 329 |
| |
305 | 330 |
| |
306 | 331 |
| |
| |||
392 | 417 |
| |
393 | 418 |
| |
394 | 419 |
| |
395 |
| - | |
| 420 | + | |
396 | 421 |
| |
397 | 422 |
| |
398 | 423 |
| |
| |||
427 | 452 |
| |
428 | 453 |
| |
429 | 454 |
| |
430 |
| - | |
| 455 | + | |
431 | 456 |
| |
432 | 457 |
| |
433 | 458 |
| |
| |||
1088 | 1113 |
| |
1089 | 1114 |
| |
1090 | 1115 |
| |
1091 |
| - | |
| 1116 | + | |
1092 | 1117 |
| |
1093 | 1118 |
| |
1094 | 1119 |
| |
| |||
1125 | 1150 |
| |
1126 | 1151 |
| |
1127 | 1152 |
| |
1128 |
| - | |
| 1153 | + | |
1129 | 1154 |
| |
1130 | 1155 |
| |
1131 | 1156 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
15 | 15 |
| |
16 | 16 |
| |
17 | 17 |
| |
18 |
| - | |
| 18 | + | |
19 | 19 |
| |
20 | 20 |
| |
21 | 21 |
| |
|
Lines changed: 3 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
457 | 457 |
| |
458 | 458 |
| |
459 | 459 |
| |
| 460 | + | |
| 461 | + | |
| 462 | + | |
460 | 463 |
| |
461 | 464 |
| |
462 | 465 |
| |
|
0 commit comments
Comments
(0)