forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitdab52ab
committed
Improve ExecStoreTuple to be smarter about replacing the contents of
a TupleTableSlot: instead of calling ExecClearTuple, inline the neededoperations, so that we can avoid redundant steps. In particular, whenthe old and new tuples are both on the same disk page, avoid releasingand re-acquiring the buffer pin --- this saves work in both the bufmgrand ResourceOwner modules. To make this improvement actually useful,partially revert a change I made on 2004-04-21 that caused SeqNextet al to call ExecClearTuple before ExecStoreTuple. The motivationfor that, to avoid grabbing the BufMgrLock separately for releasingthe old buffer and grabbing the new one, no longer applies. Myprofiling says that this saves about 5% of the CPU time for anall-in-memory seqscan.1 parentc0a2f8c commitdab52ab
File tree
5 files changed
+33
-55
lines changed- src/backend/executor
5 files changed
+33
-55
lines changedLines changed: 21 additions & 11 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
15 | 15 |
| |
16 | 16 |
| |
17 | 17 |
| |
18 |
| - | |
| 18 | + | |
19 | 19 |
| |
20 | 20 |
| |
21 | 21 |
| |
| |||
402 | 402 |
| |
403 | 403 |
| |
404 | 404 |
| |
405 |
| - | |
| 405 | + | |
406 | 406 |
| |
407 |
| - | |
408 |
| - | |
| 407 | + | |
| 408 | + | |
409 | 409 |
| |
410 | 410 |
| |
411 |
| - | |
| 411 | + | |
412 | 412 |
| |
413 | 413 |
| |
414 | 414 |
| |
415 | 415 |
| |
416 | 416 |
| |
| 417 | + | |
| 418 | + | |
| 419 | + | |
417 | 420 |
| |
418 | 421 |
| |
419 | 422 |
| |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
420 | 428 |
| |
421 |
| - | |
422 |
| - | |
423 |
| - | |
424 |
| - | |
425 |
| - | |
426 |
| - | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
427 | 437 |
| |
428 | 438 |
| |
429 | 439 |
| |
|
Lines changed: 2 additions & 11 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
21 | 21 |
| |
22 | 22 |
| |
23 | 23 |
| |
24 |
| - | |
| 24 | + | |
25 | 25 |
| |
26 | 26 |
| |
27 | 27 |
| |
| |||
75 | 75 |
| |
76 | 76 |
| |
77 | 77 |
| |
78 |
| - | |
79 |
| - | |
80 |
| - | |
81 |
| - | |
82 |
| - | |
83 |
| - | |
84 |
| - | |
85 |
| - | |
86 |
| - | |
87 | 78 |
| |
88 | 79 |
| |
89 | 80 |
| |
| |||
94 | 85 |
| |
95 | 86 |
| |
96 | 87 |
| |
97 |
| - | |
| 88 | + | |
98 | 89 |
| |
99 | 90 |
| |
100 | 91 |
| |
|
Lines changed: 2 additions & 11 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
8 | 8 |
| |
9 | 9 |
| |
10 | 10 |
| |
11 |
| - | |
| 11 | + | |
12 | 12 |
| |
13 | 13 |
| |
14 | 14 |
| |
| |||
74 | 74 |
| |
75 | 75 |
| |
76 | 76 |
| |
77 |
| - | |
78 |
| - | |
79 |
| - | |
80 |
| - | |
81 |
| - | |
82 |
| - | |
83 |
| - | |
84 |
| - | |
85 |
| - | |
86 | 77 |
| |
87 | 78 |
| |
88 | 79 |
| |
| |||
93 | 84 |
| |
94 | 85 |
| |
95 | 86 |
| |
96 |
| - | |
| 87 | + | |
97 | 88 |
| |
98 | 89 |
| |
99 | 90 |
| |
|
Lines changed: 5 additions & 12 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
8 | 8 |
| |
9 | 9 |
| |
10 | 10 |
| |
11 |
| - | |
| 11 | + | |
12 | 12 |
| |
13 | 13 |
| |
14 | 14 |
| |
| |||
61 | 61 |
| |
62 | 62 |
| |
63 | 63 |
| |
64 |
| - | |
65 |
| - | |
66 |
| - | |
67 |
| - | |
68 |
| - | |
69 |
| - | |
70 |
| - | |
71 |
| - | |
72 |
| - | |
73 | 64 |
| |
74 | 65 |
| |
75 | 66 |
| |
| |||
80 | 71 |
| |
81 | 72 |
| |
82 | 73 |
| |
83 |
| - | |
| 74 | + | |
84 | 75 |
| |
85 | 76 |
| |
86 | 77 |
| |
| |||
93 | 84 |
| |
94 | 85 |
| |
95 | 86 |
| |
96 |
| - | |
| 87 | + | |
97 | 88 |
| |
98 | 89 |
| |
99 | 90 |
| |
| |||
115 | 106 |
| |
116 | 107 |
| |
117 | 108 |
| |
| 109 | + | |
| 110 | + | |
118 | 111 |
| |
119 | 112 |
| |
120 | 113 |
| |
|
Lines changed: 3 additions & 10 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
8 | 8 |
| |
9 | 9 |
| |
10 | 10 |
| |
11 |
| - | |
| 11 | + | |
12 | 12 |
| |
13 | 13 |
| |
14 | 14 |
| |
| |||
106 | 106 |
| |
107 | 107 |
| |
108 | 108 |
| |
109 |
| - | |
110 |
| - | |
111 |
| - | |
112 |
| - | |
113 |
| - | |
114 |
| - | |
115 |
| - | |
116 | 109 |
| |
117 | 110 |
| |
118 | 111 |
| |
| |||
123 | 116 |
| |
124 | 117 |
| |
125 | 118 |
| |
126 |
| - | |
| 119 | + | |
127 | 120 |
| |
128 | 121 |
| |
129 | 122 |
| |
| |||
135 | 128 |
| |
136 | 129 |
| |
137 | 130 |
| |
138 |
| - | |
| 131 | + | |
139 | 132 |
| |
140 | 133 |
| |
141 | 134 |
| |
|
0 commit comments
Comments
(0)