title | summary | toc |
---|---|---|
Indexes |
Indexes are used to quickly locate data without having to look through every row of a table. |
false |
Indexes are used to quickly locate data without having to look through every row of a table. They can be created during table creation (CREATE TABLE
) or separately using the CREATE INDEX
statement. During table creation, the primary key and columns with the UNIQUE
constraint are automatically indexed.
Other index-related SQL statements:
To understand how CockroachDB chooses the best index for running a query, see Index Selection in CockroachDB.