You can execute the show index statement to query the index information about tables.
Note For more information about the show index statement, see Query the index information about a table.
Prerequisites
- A Tablestore client is initialized. For more information, see Initialization.
- A mapping table is created. For more information, see Create mapping tables.
Parameters
Parameter | Description |
---|---|
query | The SQL statement. Configure the parameter based on the required feature. |
Examples
Execute the show index in test_table
statement to query index information about the table named test_table.
const params = {
query: "show index in test_table",
}
client.sqlQuery(params, function (err, data) {
if (err) {
console.log('sqlQuery error:', err.toString());
} else {
console.log('sqlQuery success:', data);
}
});