Composite and Covering Indexes
Speed up multi-column queries with composite indexes and eliminate table lookups entirely using covering indexes with INCLUDE.
Beyond Single-Column Indexes
Many queries filter on more than one column. A composite index spans multiple columns and can serve such queries far better than separate single-column indexes.
Creating a Composite Index
List columns in the order you want them indexed.
CREATE INDEX idx_orders_cust_date
ON orders (customer_id, order_date);All lessons in this course
- B-Tree Indexes Fundamentals
- Creating and Using Indexes
- When and How to Index
- Composite and Covering Indexes