すべてのプロダクト
Search
ドキュメントセンター

Tablestore:テーブルのインデックス情報のクエリ

最終更新日:Oct 09, 2026

show index ステートメントを実行して、インデックス名、インデックスフィールド、インデックスの種類など、テーブルのインデックス情報をクエリできます。

説明

SHOW INDEX ステートメントの詳細については、「テーブルのインデックス情報のクエリ」をご参照ください。

前提条件

Tablestore クライアントが初期化されていること。詳細については、「Tablestore クライアントの初期化」をご参照ください。

パラメーター

パラメーター

説明

query

SQL ステートメントです。必要な機能に応じて、このパラメーターを設定します。

例

次のサンプルコードは、show index in test_table ステートメントを実行して、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);
  }
});

References

  • If you want to use a specific search index to query data when you use the SQL query feature, you can execute the CREATE TABLE statement to create a mapping table for the search index. For more information, see Create mapping tables for search indexes.

  • You can execute SQL statements to query data based on the fields of an index. For more information, see Query data.