docs: document chunk_size option and add a focused test#315
Open
BYK wants to merge 1 commit into
Open
Conversation
The chunk_size vec0 table option was already supported and partially tested (the minimum chunk_size=8 path is exercised in test-loadable.py), but the public docs page at site/guides/performance.md only listed it as a 'chunk_size (?)' stub. This change: - Replaces the stub with a real API section covering the contract (default 1024, range 8..4096, divisible by 8, per-table, immutable after CREATE VIRTUAL TABLE), the tradeoffs (small chunk_size reduces empty-slot waste in sparse partitions; default fits dense corpora), and the error messages users will see for invalid values. - Adds a focused test for chunk_size=64 covering the 64-row boundary crossing, KNN correctness preservation vs. chunk_size=1024, and per-table shadow-table isolation when two vec0 tables with different chunk_size values coexist in the same database.
Author
|
@asg017 - FYI this patch is LLM-generated that said I am not fire-and-forget. LMK if there are places you'd like me to change and I'd do that happily. Thanks so much for |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The
chunk_sizevec0 table option was already supported and partially tested (the minimumchunk_size=8path is exercised intest-loadable.py), but the public docs page atsite/guides/performance.mdonly listed it as achunk_size (?)stub.This change:
CREATE VIRTUAL TABLE), the tradeoffs (smallchunk_sizereduces empty-slot waste in sparse partitions; default fits dense corpora), and the error messages users will see for invalid values.chunk_size=64covering the 64-row boundary crossing, KNN correctness preservation vs.chunk_size=1024, and per-table shadow-table isolation when two vec0 tables with different chunk_size values coexist in the same database.(I maintain Lore AI, which uses
chunk_size=64fortemporal_vecto keep sparse project partitions from reserving megabytes — see #1499. Found that the option was useful but undocumented, so here is a writeup.)