All Products
Search
Document Center

Tablestore:Secondary index

Last Updated:Feb 17, 2025

The secondary index feature allows you to query data based on the primary key of a data table and the index columns of the secondary indexes that are created for the table. This speeds up data queries. This topic describes how to use the secondary index feature by using Tablestore SDK for Java.

Operation

Description

Create a secondary index

You can create a secondary index for an existing data table.

Use a secondary index to read data

You can query data in a secondary index by reading a single row of data or reading data whose primary key values are within a specific range. If the required attribute columns are included in the secondary index, data can be directly read from the secondary index. Otherwise, data must be read from the data table.

Delete a secondary index

You can delete a secondary index that is created for a data table.