
Their serialization is a string representing primary key in JSON. Currently the partition key must match the partition key of base table. Local index’s target consists of explicit partition key followed by indexed column definition. “v”, “FULL(v)”, “KEYS(v)”, “ENTRIES(v)” are all valid targets. Their serialization is just string representation, so: Global index’s target is usually just the indexed column name, unless the index has a specific type. When in doubt, DESCRIBE index_name or SELECT * FROM system_schema.indexes commands can be leveraged to see more details on index targets and type. “_X” is appended, where X is the smallest number that ensures name uniqueness.ĭefault name for an index created on table t and column v1 is thus t_v1_idx, but it can also become t_v1_idx_1 if the first one was already taken.īoth global and local indexes share the same default naming conventions.

because somebody already created a named index with the exact same name), Keyspace_name | table_name | index_name | kind | optionsĭemodb | t | local_t_v1 | COMPOSITES | Default naming ¶īy default, index names are generated from table name, column name and “_idx” postfix. The distinction is stored in index target, which is a string kept in index’s options map under the key “target”.Įxample of a global and local indexes on the same table and column: It locally stores the index in BoltDB files instead and keeps shipping those files to a shared object store i.e the same object store which is being used for storing chunks.

Global indexes use the indexed column as its partition key, while local indexes share their partition key with their base table, which ensures local lookup. Single Store Loki (boltdb-shipper index type) BoltDB Shipper lets you run Grafana Loki without any dependency on NoSQL stores for storing index.

Secondary indexes can currently be either global (default) or local. Secondary indexes in Scylla Secondary indexes in Scylla ¶
