CockroachDB Videos
← Back to all videos

What are covering indexes? | CockroachDB Community Questions

2024-04-16

Demos & Tutorials Performance

Description

"I'm seeing this index recommendation and it's using this STORING keyword to store these seemingly arbitrary columns. Why is that?" If you ran the EXPLAIN command in CockroachDB and received the recommendation, CREATE INDEX ON measurement (date) STORING (value, "timestamp"); this one's for you. Cockroach Labs Technical Evangelist Rob Reid takes a look at this Community FAQ and answers it through a live demo. Join as he discusses storing columns, covering indexes, EXPLAIN ANALYZE, and how to prevent full table scans in CockroachDB. What are covering indexes? | CockroachDB Community Questions 00:00 Introduction 00:17 Creating a table, inserting data, and running a query 01:04 Using EXPLAIN to see CockroachDB's index recommendations 01:16 What is a covering index and why did CockroachDB recommend it? 02:25 What to do if you see an index recommendation that is a STORING type Subscribe to our YouTube channel for more CockroachDB content: https://www.youtube.com/c/cockroachdb Further resources: ✔️ Indexes in CockroachDB: https://cockroa.ch/3PVLnNV ✔️ EXPLAIN command SQL: https://cockroa.ch/43SNcAV ✔️ How to use indexes for better workload performance: https://cockroa.ch/3Jfz9vQ