🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← 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?

  1. A.Indexes cannot store booleans
  2. B.The column is a primary key
  3. C.Indexes work only on text
  4. 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 →