TIL

10.3(5) 실행 계획 분석 (Extra)

10.3.12 Extra 칼럼

Extra 칼럼에는 주로 내부적인 처리 알고리즘에 대해 더 깊이 있는 내용을 보여주는 경우가 많다.

const row not found

Distinct

EXPLAIN 
SELECT DISTINCT d.dep_no 
FROM departments d, dept_emp de 
WHERE de.dept_no=d.dept_no;
id select_type table type key Extra
1 SIMPLE d index ux_deptname Using index; Using temporary
1 SIMPLE de ref PRIMARY Using index; Distinct

img.png

FirstMatch

Full scan on NULL key

Impossible HAVING

Impossible WHERE

LooseScan

No matching min/max row

EXPLAIN SELECT MIN(dept_no), MAX(dept_no)
FROM dept_emp WHERE dept_no='';

no matching row in const table

No matching rows after partition pruning

No tables used

Not exists

Range checked for each record(index map: N)

Recursive

Rematerialize

Select tables optimized away

EXPLAIN SELECT MAX(emp_no), MIN(emp_no) FROM employees;

EXPLAIN SELECT MAX(from_date), MIN(fron_date) FROM salaries WHERE emp_no=10002;

Start temporary, End temporary

unique row not found

Using filesort

Using index(커버링 인덱스)

Using index condition

Using index for group-by

타이트 인덱스 스캔(인덱스 스캔)을 통한 GROUP BY 처리

루스 인덱스 스캔을 통한 GROUP BY 처리

Using index for skip scan

Using join buffer(Block Nested Loop), Using join buffer(Batched key Access), Using join buffer(hash join)

Using MRR

Using sort_union(…), Using union(…), Using intersect(…)

Using temporary

Using where

Zero limit