The OR that lost the index
Indexes exist on student_id and separately on problem_id.
sql
SELECT * FROM submissions WHERE student_id = 4 OR problem_id = 42;
Why might this scan the whole table?
Indexes exist on student_id and separately on problem_id.
sql
SELECT * FROM submissions WHERE student_id = 4 OR problem_id = 42;
Why might this scan the whole table?