← Quiz: Indexing: all 10 questions
Quiz: Indexing · Question 3 of 10
An index exists on (city, created). Which query can use it best?
An index exists on (city, created). Which query can use it best?
- A.WHERE created > '2026-01-01'
- B.WHERE city = 'Pune' AND created > '2026-01-01'
- C.WHERE amount > 500
- D.WHERE YEAR(created) = 2026
Answer & explanation
Correct answer: WHERE city = 'Pune' AND created > '2026-01-01'
It starts with the leftmost column (city), so both parts of the index are used.
Can you get the rest right without peeking?
Take the timed Quiz: Indexing quiz free. Pass it to earn XP and count towards your certificate.
Start the quiz →