The current implementation of FreeLogicalRowIdPage has
two very inneficient methods in it:
getFirstFree
getFirstAllocated
Every call walks the slot list from the beginning
looking for a free (or allocated) item.
When performing lots of inserts, this is very
inneficient - the same used slot gets checked if it is
free over and over again.
This patch adds a "memory" to the free and allocated
linear search, so the search starts at the previous
found slot (instead of always resetting to 0).
Provisions are included to re-set the memory as slots
are freed and allocated, so the overall effect should
be identical to the existing code base.
Performance results after applying this patch are very
good - take a look in the forums for detailed test results.
This patch passes all existing record manager unit
tests, but I'm not sure if we should add tests of any
sort...
Please let me know what you think!
This type of patch should also be created for the
FreePhysicalRowIdPage class. After we are sure that
this patch does what it's supposed to, I'll make those
changes as well.
- K
FreeLogicalRowIdPage optimization patch