DESCRIBE INDEX Statement

The DESCRIBE INDEX statement defines the specified index on a table.

Syntax

describe_index_statement ::=
    (DESCRIBE | DESC) [AS JSON] INDEX index_name ON table_name

Semantics

If you want the output to be in JSON format, you can specify the optional AS JSON.

The description for the index contains the following information:

  • Name of the table on which the index is defined.
  • Name of the index.
  • Type of index. Whether the index is primary index or secondary index.
  • Whether the index is multikey? If the index is multikey then 'Y' is displayed. Otherwise, 'N' is displayed.
  • List of fields on which the index is defined.
  • The declared type of the index.
  • Description of the index.

Example 8-14 Describe Index

The following statement provides information about the index indexdemo1 on the UserInfo table.

DESCRIBE AS JSON INDEX indexdemo1 ON UserInfo;
{
  "name" : "indexdemo1",
  "type" : "secondary",
  "fields" : ["info.age"],
  "types" : ["ANYATOMIC"]
}