Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
On sqlite, deleting doesn't require painstakingly recreating the same exact data that was used for putting, we can just sweep out everything with the given header num at once. Cuts roughly 1/4 out of erase time.
- Loading branch information
Showing
1 changed file
with
7 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5bf88af
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You need to create an additional index on hnum, otherwise deleting is really really slow.
5bf88af
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yup, it's a fairly obvious one. Didn't show up in my early testing with smaller sets though, and I've been resisting the temptation to add indexes until proven gui^H^H^H necessary. Also was wondering, but hadn't gotten around to check, whether sqlite does automatic indexing on foreign keys. Apparently not.
5bf88af
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I recommend my little benchmark tool ;-)