Commit c14d975
committed
feat: add early prefix check in inverse queries
Before parsing each key, verify that it still matches the seek prefix.
This avoids iterating through keys that are lexicographically close but
cannot match. This significantly improves performance for queries for
non-existent prefixes that have many shorter prefix matches in the
database.1 parent 857b5f8 commit c14d975
1 file changed
+5
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
467 | 467 | | |
468 | 468 | | |
469 | 469 | | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
470 | 474 | | |
471 | 475 | | |
472 | 476 | | |
| |||
0 commit comments