Cassandra 2 - list existing indexes with CQL 3
问题 Is there a CQL query to list all existing indexes for particular key space, or column family? 回答1: You can retrieve primary keys and secondary indexes using the system keyspace: SELECT column_name, index_name, index_options, index_type, component_index FROM system.schema_columns WHERE keyspace_name='samplekp'AND columnfamily_name='sampletable'; Taking, for example, the following table declaration: CREATE TABLE sampletable ( key text, date timestamp, value1 text, value2 text, PRIMARY KEY(key,