Chapter 6: How Indexes Work in CockroachDB
In Chapter 5, Fault Tolerance and Auto-Rebalancing, we learned about fault-tolerance and auto-recovery strategies in CockroachDB. In this chapter, we will learn everything about indexes, what they are, and how they improve query times.
Although indexes help improve the read performance, a wrong index can slow down the queries, including the writes, and take up more storage space. So, it is important to identify the query pattern and create appropriate indexes.
The following topics will be covered in this chapter:
- Introduction to indexes
- Different types of indexes
- Best practices while using indexes