Index Overview
An index lets you query the data in the table using a different primary key from the base table, enabling faster and more accurate retrieval. KVS supports local and global secondary indexes. Indexes can be created, queried, and deleted.
Local Secondary Indexes
A local secondary index has the same shard key as its base table, but a different sort key. It is supported for tables with a composite primary key (shard key and sort key) and helps accelerate queries through the specified sort key. When a KV item is written, a local secondary index item is automatically generated and stored with strong consistency.
Global Secondary Indexes
A global secondary index has a different shard key from the base table. Each index item stores only the index data. Other data in the corresponding KV item is not included. When a KV item is written, an index item is automatically generated and then asynchronously written to the global secondary index with eventual consistency.

You can create, query, and delete indexes.
Feature |
Description |
---|---|
Create indexes for a table. |
|
Query all indexes in a table. |
|
Delete an index during table creation. |
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot