- Notifications
You must be signed in to change notification settings - Fork28
Commit03e56f7
committed
Restructure SPGiST opclass interface API to support whole-index scans.
The original API definition was incapable of supporting whole-index scansbecause there was no way to invoke leaf-value reconstruction withoutchecking any qual conditions. Also, it was inefficient formultiple-qual-condition scans because value reconstruction got done overagain for each qual condition, and because other internal work in theconsistent functions likewise had to be done for each qual. To fix theseissues, pass the whole scankey array to the opclass consistent functions,instead of only letting them see one item at a time. (Essentially, theloop over scankey entries is now inside the consistent functions notoutside them. This makes the consistent functions a bit more complicated,but not unreasonably so.)In itself this commit does nothing except save a few cycles inmultiple-qual-condition index scans, since we can't support whole-indexscans on SPGiST indexes until nulls are included in the index. However,I consider this a must-fix for 9.2 because once we release it will getvery much harder to change the opclass API definition.1 parent39d74e3 commit03e56f7
File tree
7 files changed
+517
-526
lines changed- doc/src/sgml
- src
- backend/access/spgist
- include/access
7 files changed
+517
-526
lines changedLines changed: 28 additions & 10 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
439 | 439 |
| |
440 | 440 |
| |
441 | 441 |
| |
442 |
| - | |
443 |
| - | |
| 442 | + | |
| 443 | + | |
444 | 444 |
| |
445 | 445 |
| |
446 | 446 |
| |
| |||
463 | 463 |
| |
464 | 464 |
| |
465 | 465 |
| |
466 |
| - | |
467 |
| - | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
468 | 477 |
| |
469 | 478 |
| |
470 | 479 |
| |
| |||
527 | 536 |
| |
528 | 537 |
| |
529 | 538 |
| |
530 |
| - | |
531 |
| - | |
| 539 | + | |
| 540 | + | |
532 | 541 |
| |
533 | 542 |
| |
534 | 543 |
| |
| |||
544 | 553 |
| |
545 | 554 |
| |
546 | 555 |
| |
547 |
| - | |
548 |
| - | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
| 562 | + | |
| 563 | + | |
| 564 | + | |
| 565 | + | |
| 566 | + | |
549 | 567 |
| |
550 | 568 |
| |
551 | 569 |
| |
| |||
566 | 584 |
| |
567 | 585 |
| |
568 | 586 |
| |
569 |
| - | |
570 |
| - | |
| 587 | + | |
| 588 | + | |
571 | 589 |
| |
572 | 590 |
| |
573 | 591 |
| |
|
Lines changed: 80 additions & 108 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
159 | 159 |
| |
160 | 160 |
| |
161 | 161 |
| |
162 |
| - | |
163 |
| - | |
164 | 162 |
| |
| 163 | + | |
| 164 | + | |
165 | 165 |
| |
166 |
| - | |
167 | 166 |
| |
168 | 167 |
| |
169 | 168 |
| |
170 | 169 |
| |
171 | 170 |
| |
172 | 171 |
| |
173 | 172 |
| |
174 |
| - | |
175 |
| - | |
176 |
| - | |
177 |
| - | |
178 |
| - | |
179 | 173 |
| |
180 |
| - | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
181 | 178 |
| |
182 |
| - | |
183 |
| - | |
184 |
| - | |
185 |
| - | |
186 |
| - | |
187 |
| - | |
188 |
| - | |
189 |
| - | |
190 |
| - | |
191 |
| - | |
192 |
| - | |
193 |
| - | |
194 |
| - | |
195 |
| - | |
196 |
| - | |
197 |
| - | |
198 |
| - | |
199 |
| - | |
200 |
| - | |
201 |
| - | |
202 |
| - | |
203 |
| - | |
204 |
| - | |
205 |
| - | |
206 |
| - | |
207 |
| - | |
208 |
| - | |
209 |
| - | |
210 |
| - | |
211 |
| - | |
212 |
| - | |
213 |
| - | |
214 |
| - | |
215 |
| - | |
216 |
| - | |
217 |
| - | |
218 |
| - | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
219 | 194 |
| |
220 |
| - | |
221 |
| - | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
222 | 199 |
| |
223 |
| - | |
| 200 | + | |
224 | 201 |
| |
225 |
| - | |
226 |
| - | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
227 | 206 |
| |
228 |
| - | |
229 |
| - | |
230 |
| - | |
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 |
| - | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
267 | 226 |
| |
268 |
| - | |
269 |
| - | |
270 |
| - | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
271 | 231 |
| |
272 |
| - | |
273 |
| - | |
274 |
| - | |
275 |
| - | |
276 |
| - | |
277 |
| - | |
278 |
| - | |
279 | 232 |
| |
280 | 233 |
| |
281 |
| - | |
282 |
| - | |
283 |
| - | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
284 | 238 |
| |
285 |
| - | |
286 |
| - | |
287 |
| - | |
288 |
| - | |
289 |
| - | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
290 | 248 |
| |
291 | 249 |
| |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
292 | 264 |
| |
293 | 265 |
| |
294 | 266 |
| |
|
0 commit comments
Comments
(0)