Storages: Optimize vector search in scenarios with updates (#9597)#9609
Merged
ti-chi-bot[bot] merged 8 commits intopingcap:release-8.5from Nov 14, 2024
Merged
Conversation
Signed-off-by: Lloyd-Pottiger <yan1579196623@gmail.com> fix Signed-off-by: Lloyd-Pottiger <yan1579196623@gmail.com> fix Signed-off-by: Lloyd-Pottiger <yan1579196623@gmail.com>
Signed-off-by: Lloyd-Pottiger <yan1579196623@gmail.com>
12 tasks
Contributor
|
/hold |
Contributor
|
/unhold |
Lloyd-Pottiger
approved these changes
Nov 14, 2024
JaySon-Huang
approved these changes
Nov 14, 2024
Contributor
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: JaySon-Huang, Lloyd-Pottiger The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Contributor
[LGTM Timeline notifier]Timeline:
|
Contributor
|
/test pull-integration-test |
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.
This is an automated cherry-pick of #9597
What problem does this PR solve?
Issue Number: ref #9600 , close #9599
Problem Summary:
What is changed and how it works?
Before, the read path of vector search is:
A simple example:
We have cf_0 (indexed, offset: 100-110), cf_1 (indexed, offset: 110-120), cf_3 (indexed, offset: 120-130), cf_4 (memtable, offset: 130-140), dmfile_0 (indexed, offset: 0-100, each 10 rows as a pack), to find top5:
So, in this example, we need to read 3 packs and 3 ColumnFileTinys.
This PR changes the read path to:
Still using the above example, now to find top5:
Now, we only need to read 2 packs and 2 ColumnFileTinys.
Benchmark
Run VectorDBBench, about 750k stable, 250k delta with vector index, 4k delta without vector index.
Note: should disable compact tiflash replica
Without this PR (after fix #9599)
With this PR
All data are in stable
Check List
Tests
Side effects
Documentation
Release note