forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit317ffdf
committed
Allow to reset execGrouping.c style tuple hashtables.
This has the advantage that the comparator expression, the table'sslot, etc do not have to be rebuilt. Additionally the simplehash.hhashtable within the tuple hashtable now keeps its previous size anddoesn't need to be reallocated. That both reduces allocator overhead,and improves performance in cases where the input estimation was offby a significant factor.To avoid an API/ABI break, the new parameter is exposed via the newBuildTupleHashTableExt(), and BuildTupleHashTable() now is a wrapperaround the former, that continues to allocate the table itself in thetablecxt.Using this fixes performance issues discovered in the two bugsreferenced. This commit however has not converted the callers, that'sdone in a separate commit.Bug: #15592 #15486Reported-By: Jakub Janeček, Dmitry MarakasovAuthor: Andres FreundDiscussion:https://postgr.es/m/15486-05850f065da42931@postgresql.orghttps://postgr.es/m/20190114180423.ywhdg2iagzvh43we@alap3.anarazel.deBackpatch: 11, this is a prerequisite for other fixes1 parent3b632a5 commit317ffdf
File tree
2 files changed
+66
-14
lines changed- src
- backend/executor
- include/executor
2 files changed
+66
-14
lines changedLines changed: 56 additions & 14 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
139 | 139 |
| |
140 | 140 |
| |
141 | 141 |
| |
142 |
| - | |
| 142 | + | |
| 143 | + | |
143 | 144 |
| |
144 | 145 |
| |
145 | 146 |
| |
| |||
150 | 151 |
| |
151 | 152 |
| |
152 | 153 |
| |
153 |
| - | |
154 |
| - | |
155 |
| - | |
156 |
| - | |
157 |
| - | |
158 |
| - | |
159 |
| - | |
160 |
| - | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
161 | 164 |
| |
162 | 165 |
| |
163 | 166 |
| |
| |||
168 | 171 |
| |
169 | 172 |
| |
170 | 173 |
| |
171 |
| - | |
172 |
| - | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
173 | 177 |
| |
174 | 178 |
| |
175 | 179 |
| |
| |||
195 | 199 |
| |
196 | 200 |
| |
197 | 201 |
| |
198 |
| - | |
199 |
| - | |
200 |
| - | |
| 202 | + | |
201 | 203 |
| |
202 | 204 |
| |
203 | 205 |
| |
| |||
227 | 229 |
| |
228 | 230 |
| |
229 | 231 |
| |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
230 | 272 |
| |
231 | 273 |
| |
232 | 274 |
| |
|
Lines changed: 10 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
124 | 124 |
| |
125 | 125 |
| |
126 | 126 |
| |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
127 | 136 |
| |
128 | 137 |
| |
129 | 138 |
| |
130 | 139 |
| |
131 | 140 |
| |
132 | 141 |
| |
133 | 142 |
| |
| 143 | + | |
134 | 144 |
| |
135 | 145 |
| |
136 | 146 |
| |
|
0 commit comments
Comments
(0)