← Quiz: Indexing: all 10 questions
Quiz: Indexing · Question 9 of 10
A column isactive has only two values across 1 crore rows. Why may an index on it not help much?
A column is_active has only two values across 1 crore rows. Why may an index on it not help much?
- A.Indexes cannot store booleans
- B.The column is a primary key
- C.Indexes work only on text
- D.Each value matches a huge share of rows, so the database often prefers a full scan
Answer & explanation
Correct answer: Each value matches a huge share of rows, so the database often prefers a full scan
Indexes help most when a condition picks out a small fraction of the rows.
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 →