~/ learn/ comp-378/ cards/ Indexes & Query Performance (Intro)
1 of 4

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);

space flip · ← → navigate · esc to exit
NORMAL ~/memra/library/a94947f0-d132-45dc-b5b3-be4502240028/flashcard utf-8 LF