Inspect the query plan for selecting Computing-Science-major students (major_dept_id = 1) with EXPLAIN, then create an index on that column. (Type-mode: run the plan and the DDL.)
Inspect the query plan for selecting Computing-Science-major students (major_dept_id = 1) with EXPLAIN, then create an index on that column. (Type-mode: run the plan and the DDL.)
Answer
EXPLAIN SELECT * FROM students WHERE major_dept_id = 1; CREATE INDEX idx_students_major ON students (major_dept_id);