-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[kvstore] Support property index #71
Comments
We want to have the infrastructure to support indices on one or more properties |
There are some requirements here:
|
👍 |
Please upload your design doc before starting your work. @boshengchen @darionyaphet |
Design concept:
DDL grammar :
Metadata manager:
Storage :
Related feature :
// TODO , The following are temporarily unsupported. |
@boshengchen Awesome thoughts! It's a wonderful start point. Here are some suggestions and questions I have
This seems a huge task. After we settle down on design, I might want to break this into multiple smaller subtasks |
Here is non existent Add one more
|
Nice suggestion @sherman-the-tank ,I have a clearer and more thorough understanding from your suggestion. Thanks ! Answer your questions one by one as above. |
No, |
I will keep updating this design document Query LanguageCREATE INDEX Syntax
Sample:
DROP INDEX Syntax
Sample:
|
Thanks for your docs @boshengchen @darionyaphet Let's break the topic into three parts:
1. What' the DDL about index? But i have a question about "create index"? |
2. How to store the index in storage layer? |
3. How to build the index and how to drop it?
|
By default, when an index is created, it will build index synchronously during But it's not feasible when the dataset is very large. So I support a When this keyword is specify, it will return immediately and using a tool to make index for old data. If the rebuild index failed, user can get a feedback. |
Good idea, It seems better to put the keyword |
Storage LayerIn Storage Layer, we should save About Index Structure The index key was composed of : (Currently uncertainty is whether a type needs to be added between The The About Append When use the first N columns in a M-column index (M > N), we can use prefix query it and also valid for range query. If we want to About Update When update the data, should remove the index data firstly and append the new index . About Drop Remove the whole Remove the As shown in the following figure :
|
Actually, I still don't understand of "Only use the first N columns in a M-column index (where M > N)", |
Oh, yeah ! How can scan second column ? such as where col1 == 02 ? |
|
Let's talk about it offline. Will be more efficient. |
It's seems could not fetch the date using the second column in index . |
After discussed offline, the workflow as follows: Create index
Notes:
Drop Index
Any suggestions? @sherman-the-tank @boshengchen @darionyaphet |
I'm glad to see a lot of great ideas here. Just want to through a few of my thoughts
|
If you create index on two columns such as A + B, just combine the two values in order. |
If no more suggestions today, i will split the issue to more tasks and discuss the detail for each task. |
Cool, Take us to fly. |
The tasks list here. Any suggestions? @sherman-the-tank @boshengchen @darionyaphet |
Awesome work, guys!! Discussed with @dangleptr offline, here are the summary. I would like to see this integrated into the design documentation
|
Sounds good to me. Let me post the requirements mentioned above in each detail task. |
* Fix nightly pkg name * restore changes Co-authored-by: cpw <13495049+CPWstatic@users.noreply.github.com> Co-authored-by: Yee <2520865+yixinglu@users.noreply.github.com>
No description provided.
The text was updated successfully, but these errors were encountered: