L3 Q5
Advanced Level
Practice Question
Level 3 - Question 5: Creating Indexes for Performance
Scenario
Your database administrator notices that queries searching for customers by email are running slowly. The customers table has millions of rows.
Task
Create an index on the email column of the customers table to improve query performance. Then write a query that would benefit from this index.
Sample Schema: customers
| customer_id | name | city | |
|---|---|---|---|
| 1 | Alice Johnson | alice@example.com | New York |
| 2 | Bob Smith | bob@example.com | Chicago |
| 3 | Carol White | carol@example.com | Houston |