Experiment Detail

MySQL Performance Monitoring

2026. 11. 18.

● System Ready

Experiment Detail Information

고객 이메일 검색 성능 비교

특정 이메일을 검색하는 쿼리를 대상으로 인덱스 적용 전후의 성능 비교

SQL Query

Query 4

SELECT email FROM customer WHERE customer_name = '오서준';

Index Condition

Registered Index Conditions

Query 4 - Condition 9

인덱스 적용

테이블명: customer

인덱스명: idx_customer_name

인덱스 컬럼: customer_name

Query 4 - Condition 10

인덱스 미적용

Query 4

구분 평균 실행 시간 중앙값
Before 17.61 ms 17.61 ms
After (Condition 9) 3.22 ms 3.12 ms

Query 4

구분 1회차 2회차 3회차 4회차 5회차
Before 17.71 ms 17.61 ms 17.63 ms 17.56 ms 17.54 ms
After (Condition 9) 3.12 ms 3.24 ms 3.07 ms 3.72 ms 2.97 ms

Query 4

Before

EXPLAIN
customer
접근 방식 (type)

ALL

선택 인덱스 (key)

없음

예상 행 수 (rows)

49843

필터 비율 (filtered)

10.0%

상세 실행 계획 정보
SELECT ID (id)

1

SELECT 유형 (select_type)

SIMPLE

파티션 (partitions)

없음

인덱스 길이 (key_len)

없음

참조 값 (ref)

없음

가능한 인덱스 (possible_keys)

없음

추가 정보 (Extra)

Using where

EXPLAIN ANALYZE
-> Filter: (customer.customer_name = '오서준')  (cost=5273 rows=4984) (actual time=6.45..67.1 rows=294 loops=1)
    -> Table scan on customer  (cost=5273 rows=49843) (actual time=4.53..59.8 rows=50000 loops=1)

After (Condition 9)

EXPLAIN
customer
접근 방식 (type)

ref

선택 인덱스 (key)

idx_customer_name

예상 행 수 (rows)

294

필터 비율 (filtered)

100.0%

상세 실행 계획 정보
SELECT ID (id)

1

SELECT 유형 (select_type)

SIMPLE

파티션 (partitions)

없음

인덱스 길이 (key_len)

42

참조 값 (ref)

const

가능한 인덱스 (possible_keys)

idx_customer_name

추가 정보 (Extra)

없음

EXPLAIN ANALYZE
-> Index lookup on customer using idx_customer_name (customer_name='오서준')  (cost=103 rows=294) (actual time=0.108..0.833 rows=294 loops=1)