DESCRIBE INDEX
Shows the definition of a specified index as an executable CQL statement.
|
To get all indexes for a table, use |
Synopsis
DESCRIBE INDEX <keyspace_name>.<index_name>
- keyspace_name
-
Name of the keyspace
- index_name
-
Name of the index. If an index name was not specified when the index was created, the default name is the column name, underscore, followed by idx.
Examples
- Verify that an index was created
-
-
Create an index:
CREATE INDEX nationality_idx ON cycling.cyclist_alt_stats (nationality); -
Show the definition of the index:
DESC INDEX cycling.nationality_idxIf the index exists, the result is the index definition as an executable CQL statement. It should be similar to the statement used to create the index.
CREATE INDEX nationality_idx ON cycling.cyclist_alt_stats (nationality);
-
- Describe SAI index
-
DESCRIBE INDEX cycling.rank_idx;CREATE CUSTOM INDEX rank_idx ON cycling.rank_by_year_and_name (rank) USING 'StorageAttachedIndex';