Composite Index
CREATE INDEX idx_emp_dept ON employees(department_id, salary);Use EXPLAIN to check if your query uses the index effectively.
CREATE INDEX idx_emp_dept ON employees(department_id, salary);Use EXPLAIN to check if your query uses the index effectively.