forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitf5ae3ba
committed
Make tbm_add_tuples more efficient by caching the last acccessed page.
When adding a large number of tuples to a TID bitmap usingtbm_add_tuples() sometimes a lot of time was spent looking up a page'sentry in the bitmap's internal hashtable.Improve efficiency by caching the last accessed page, while iteratingover the passed in tuples, hoping consecutive tuples will often be onthe same page. In many cases that's a good bet, and in the rest theadded overhead isn't big.Discussion: 54479A85.8060309@sigaev.ruAuthor: Teodor SigaevReviewed-By: David Rowley1 parentaa1d2fc commitf5ae3ba
1 file changed
+18
-6
lines changedLines changed: 18 additions & 6 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
268 | 268 |
| |
269 | 269 |
| |
270 | 270 |
| |
271 |
| - | |
| 271 | + | |
| 272 | + | |
272 | 273 |
| |
273 | 274 |
| |
274 | 275 |
| |
275 | 276 |
| |
276 | 277 |
| |
277 | 278 |
| |
278 |
| - | |
279 | 279 |
| |
280 | 280 |
| |
281 | 281 |
| |
282 | 282 |
| |
283 | 283 |
| |
284 | 284 |
| |
285 | 285 |
| |
286 |
| - | |
287 |
| - | |
288 |
| - | |
289 |
| - | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
290 | 298 |
| |
291 | 299 |
| |
292 | 300 |
| |
| |||
303 | 311 |
| |
304 | 312 |
| |
305 | 313 |
| |
| 314 | + | |
306 | 315 |
| |
| 316 | + | |
| 317 | + | |
| 318 | + | |
307 | 319 |
| |
308 | 320 |
| |
309 | 321 |
| |
|
0 commit comments
Comments
(0)