SlideShare a Scribd company logo
1 of 30
Download to read offline
제 7회 엑셈 수요 세미나 자료
EXEM seminar report no. 007 (2016.07.06)
Research & Contents Team
Table of Agenda
© Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved.
01.
02.
03.
[PostgreSQL] Vacuum의 거의 모든 것 (3차)
[MySQL] Page와 Undo page deep internal 분석
[MySQL] Hint 사용법
© Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved.
01. [PostgreSQL] Vacuum의 거의 모든 것 (3차)
발표자: 연구컨텐츠팀 김숙진
© Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved.
목차
1차
1) Vacuum 정의 및 필요성
2) Vacuum 실행 구조
3) 표준 Vacuum VS Vacuum full (시나리오)
2차
1) dump로 보는 “표준 Vacuum VS Vacuum full”
[PostgreSQL] Vacuum의 거의 모든 것
3차
1) XID wraparound and freezing tuple
2) Autovacuum
© Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved.
1. XID Wraparound and Freezing Tuple
• 트랜잭션에 대한 MVCC 기법:
XID(트랜잭션 ID)를 숫자로 처리하고 비교
• 232 까지 표현이 가능 (대략 40억)
• 40억 트랜잭션: 옛 XID(20억) + 새 XID(20억)
• 옛 XID 20억은 보이고, 새 XID 20억은 안보이게 처리
• 계속 순환하면서 사용
출처: http://www.slideshare.net/pgdayasia/introduction-to-vacuum-freezing-and-xid
새 XID(20억)
옛 XID(20억)
Visible
( Invisible )
© Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved.
1. XID Wraparound and Freezing Tuple
• XID wraparound 때문에 오래된 데이터에 대한 손실 발생
• Insert–only 테이블에서만 발생
출처: http://www.slideshare.net/hadoopxnttdata/postgresql-xid-wraparound-another-issue
과거(visible)
미래(invisible)
Visible Visible Invisible
© Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved.
1. XID Wraparound and Freezing Tuple
• 튜플을 “FREEZE”로 표시하고, 이 FrozenXID는 일반 XID 비교 대상에서 항상 제외되어 항상 보여짐
• 20억 트랜잭션이 생기기 전에 FrozenXID 즉, 영구 보관용 자료로 변경하면 XID 겹침 오류 방지
• 이러한 변경 작업(data freezing)은 VACUUM FREEZE 명령으로 처리
출처: http://www.slideshare.net/hadoopxnttdata/postgresql-xid-wraparound-another-issue
과거(visible)
미래(invisible)
Visible VisibleVisible
© Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved.
1. XID Wraparound and Freezing Tuple
Skip 되는 블록
pg_class 테이블의 relfrozenxid 칼럼값 :
VACUUM 작업으로 그 테이블 전체에 대해서
XID 정리 작업을 했던 트랜잭션 ID 값
출처: http://www.slideshare.net/hadoopxnttdata/postgresql-xid-wraparound-another-issue
© Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved.
1. XID Wraparound and Freezing Tuple
출처: http://www.slideshare.net/pgdayasia/introduction-to-vacuum-freezing-and-xid
20억
2억
1.5억
autovacuum 데몬에 의해 강제로 테이블의
모든 페이지를 조사해서 트랜잭션 ID 겹침
오류를 방지
• Table age가 (vacuum_freeze_table_age – vacuum_freeze_min_age)보다 크면, 모든 페이지를 검사해서
변경 작업을 진행
VACUUM 작업에서 모든 페이지를 대상
으로 이 XID 변경 작업을 할 것인지 결정
가능
0으로 지정하면, VM 확인하지 않고 항상
모든 페이지 검사
최대값: autovacuum_freeze_max_age
* 0.95
© Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved.
1. XID Wraparound and Freezing Tuple
출처: http://www.slideshare.net/pgdayasia/introduction-to-vacuum-freezing-and-xid
20억
2억
1.5억
이 시점에서는 표준 VACUUM이 실행됨
© Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved.
1. XID Wraparound and Freezing Tuple
출처: http://www.slideshare.net/pgdayasia/introduction-to-vacuum-freezing-and-xid
20억
2억
1.5억
이 시점에서 VACUUM 작업을 하면
anti-wraparound VACUUM이 실행됨
© Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved.
1. XID Wraparound and Freezing Tuple
FrozenXID로 바꾸기 전 옛 XID를
얼마나 남길 것인가 지정
anti-wraparound VACUUM 후에는
relfrozenxid 값이 업데이트됨
출처: http://www.slideshare.net/pgdayasia/introduction-to-vacuum-freezing-and-xid
© Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved.
20억
2억
1.5억
1. XID Wraparound and Freezing Tuple
• 한 테이블이 vacuum 작업 없이 계속 트랜잭션 작업할 수 있는 간격
: 마지막 vacuum 이후부터, 20억 – vacuum_freeze_min_age 값만큼의 트랜잭션
• 트랜잭션 발생, vacuum 작업 없다면 데이터 손실
Autovacuum 기능을 사용하지 않더라도, autovacuum_freeze_max_age 지정 간격으로 vacuum 작업 진행
• 한 테이블에 대해 vacuum 작업이 한번도 하지 않았다면, (Autovacuum_freeze_max_age –
vacuum_freeze_min_age) 값 만큼의 트랜잭션 발생 시, autovacuum 자동 진행
© Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved.
2. Autovacuum
Autovacuum launcher
Autovacuum_naptime 값으로 지정한 초 간격으로 한 번에 하나의 데
이터베이스를 작업할 수 있도록 worker 프로세스의 실행 시간을 관리
Autovacuum workers
Autovacuum_max_workers worker 프로세스 최대 개수
AUTOVACUUM이란? VACUUM 명령과 ANALYZE 명령을 주기적으로 자동 실행
• 주기적인 표준 Vacuum 작업을 하여 빈 공간을 확보하여 최대한 Vacuum Full 작업을 방지
• 최소의 디스크를 쓰는 것이 아닌 최적의 디스크 공간만 사용
출처: http://www.slideshare.net/alexeylesovsky/deep-dive-into-postgresql-statistics-60849690
© Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved.
2. Autovacuum
• Autovacuum 데몬은 이러한 예상치 못한 상황에 대해 자동으로 Vacuum 작업을 진행하여 위와 같은 문제를 피할 수 있음
• 정확한 데이터베이스 사용량을 파악하지 않고 autovacuum을 끄면 안됨
• Autovacuum 데몬을 사용하지 않는다면, 해당 DB 서버에서 사용하고 있는 모든 DB에 대해서 Vacuum 작업을 해야 함
• Autovacuum 데몬은 테이블 자료 추가/변경/삭제 된 경우, 무조건 작업의 고려 대상으로 판단 (임시 테이블은 대상에서 제외)
Vacuum 작업은
내가 직접 작업량이
적은 밤 시간에 주
기적으로 해야지!
갑자기 변경이 많은 작업 발생 최악의 경우, Vacuum Full
DBA
© Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved.
2. Autovacuum
autovacuum_naptime
autovacuum 데몬에 대한 “activity rounds”간격 즉, autovacuum 데몬이 한번 작업
하고, 쉬는 시간 (기본 값 1분 – 초(秒)로 설정)
autovacuum_vacuum_threshold / autovacuum_analyze_threshold
한 테이블 내에서 업데이트/삭제된 튜플이 설정 값만큼 된다면 VACUUM/ANAYLZE 작
업하는 수행, 작업 시작할 최소 변경 수 (기본 값 50)
autovacuum_freeze_max_age
한 테이블 내에서 마지막 vacuum 작업으로 pg_class.relfrozenxid 값이 지정된 뒤로,
이 설정 값보다 더 커지면 vacuum 작업 수행
autovacuum_vacuum_cost_delay
autovacuum 데몬의 초과 비용 사용시, 멈추는 최대 시간
autovacuum_vacuum_cost_limit
autovacuum 데몬이 사용할 수 있는 최대 비용
autovacuum_vacuum_scale_factor
한 테이블 내에서 autovacuum_vacuum_threshold 값이 초과되어 vacuum 작업을 시
작하려고 할 때, 추가적으로 테이블 크기의 변화량 (기본값은 0.2 = 테이블 크기의 20%)
© Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved.
Autovacuum이 작업하는 기준
2. Autovacuum
1. 테이블 나이가 autovacuum_freeze_max_age 설정으로 지정한 트랜잭션 수보다 많다면, 그 테이블은 무조건 Vacuum 작업
* 테이블의 나이: relfrozenxid 칼럼 값을 age () 함수로 조사한 값
2. 테이블의 자료가 변경되어, Vacuum 임계치를 초과했다면, Vacuum 작업
* Vacuum 임계치 = Vacuum 초기 임계치 + Vacuum 배율값 * 튜플수
• Vacuum 초기 임계치: autovacuum_vacuum_threshold
• Vacuum 배율값: autovacuum_vacuum_scale_factor
• 튜플수: pg_class.reltuples
© Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved.
02. [MySQL] Page와 Undo page deep internal 분석
발표자: 연구컨텐츠팀 이근오
© Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved.
Page와 Undo page deep internal 분석
Page의 기본구조
1개의 Page는 16 KB 구성
Page의 Header/Trailer 상세
1개의 Page는 16 KB 구성
Page 덤프
테이블(T1)의 파일 덤프
© Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved.
Page와 Undo page deep internal 분석
Clustered indexes Page 상세 (1/2) Page 덤프
테이블(T1)의 파일 덤프
03 06 02 0e
00
00
00 10
00 30
50 50 31 30 31 30 20 …
00 00 00 af 06 22
bc 00 00 61 0c 01 10
41 20 41 20 …
trx_id “af0622” hex값을 변환하면 11470370
The fields of the roll pointer structure are:
1-bit “is insert” flag,
7-bit rollback segment ID,
4-byte page number and
2-byte page offset of the undo log location.
 create table exem_i.t1 ( c1 char(14), c2 char(2)
, c3 char(6), c4 char(3)
, primary key(c1) ) engine=innodb ;
 create index t1_ix1 on exem_i.t1( c3,c4 ) ;
 Insert into t1 values (‘PP1010’,’A’,’A’,’A’) ;
 Insert into t1 values (‘PP1020’,’A’,’A’,’A’) ;
 Insert into t1 values (‘PP1030’,’A’,’A’,’A’) ;
© Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved.
Page와 Undo page deep internal 분석
Clustered indexes Page 상세 (2/2) Page 덤프
테이블(T1)의 파일 덤프 PK인덱스로 구성된 테이블의 Page 상세구조
 Infimum 포인트에서 시작해서 Next Offset 값으로
연결된 구조
© Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved.
Page와 Undo page deep internal 분석
Secondary indexes Page 상세 Page 덤프
테이블(T1) 의 파일에서 인덱스페이지 덤프 Non-PK 인덱스의 Page 상세구조
 Clustered indexes 페이지와 비슷한 구조로 Infimum
포인트에서 시작해서 Next Offset 값으로 연결된 구조
 오라클의 rowid 값 역할을 PK 컬럼이 대신한다.
© Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved.
03. [MySQL] Hint 사용법
발표자: 연구컨텐츠팀 이대덕
© Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved.
Hint 사용법
분류 힌트명 설명 용법
• 5.7.7부터 출시된 힌트들
• 이전 버전에서는optimizer_switch
변수로 설정을 했지만 쿼리단위로
설정을 할 수는 없었음
BKA
Batched Key Access join수행여부
/*+ BKA(@qb|table) */
NO_BKA /*+ NO_BKA(@qb|table) */
BNL
Block Nested-Loop join수행여부
/*+ BNL(@qb|table) */
NO_BNL /*+ NO_BNL(@qb|table) */
MRR
Multi-Range Read 오퍼레이션 수행여부
/*+ MRR(table|index) */
NO_MRR /*+ NO_MRR(table|index) */
MAX_EXECUTION_TIME SELECT 수행시간에 제한을 둠 (N milliseconds) /*+ MAX_EXECUTION_TIME(n) */
NO_ICP Index Condition Pushdown오퍼레이션이 수행안되게 함 /*+ NO_ICP(table|index) */
NO_RANGE_OPTIMIZATION
Range 스캔을 사용하지 못하게 함 해당 힌트 사용시 인덱스
Merge나 Loose 인덱스 스캔도 불가능
/*+ NO_RANGE_OPTIMIZATION(ta
ble|index) */
QB_NAME 쿼리블록에 이름을 할당함 /*+ QB_NAME(qbname) */
SEMIJOIN
세미조인전략 지정 및 사용여부 (DUPSWEEDOUT, FIRSTMA
TCH, LOOSESCAN, MATERIALIZATION)
/*+ SEMIJOIN(@qb strategy) */
NO_SEMIJOIN
/*+ NO_SEMIJOIN(@qb strategy)
*/
SUBQUERY 서브쿼리전략 지정(INTOEXISTS, MATERIALIZATION) /*+ SUBQUERY(@qb strategy) */
© Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved.
Hint 사용법
분류 힌트명 설명 용법
• 예약어중 힌트의 용도로 사
용되는 것들
(http://dev.mysql.com/d
oc/refman/5.7/en/keywo
rds.html)
USE INDEX 사용할 인덱스를 선택
USE {INDEX|KEY} [FOR {JOIN|ORDER BY|GR
OUP BY}] ([index_list])
INGONRE INDEX 명시된 인덱스를 사용하지 않음
IGNORE {INDEX|KEY} [FOR {JOIN|ORDER BY|
GROUP BY}] (index_list)
FORCE INDEX 사용할 인덱스를 강제로 선택
FORCE {INDEX|KEY} [FOR {JOIN|ORDER BY|
GROUP BY}] (index_list)
STRAIGHT_JOIN 조인의 순서를 FROM절의 순서로 고정 SELECT STRAIGHT_JOIN ... FROM
SQL_SMALL_RESULT 옵티마이저가 결과가 '작을' 것이라고 알려줌 SELECT SQL_SMALL_RESULT ... FROM
SQL_BIG_RESULT 옵티마이저가 결과가 '클' 것이라고 알려줌 SELECT SQL_BIG_RESULT ... FROM
SQL_BUFFER_RESULT 결과를 임시테이블에 두며, 서브쿼리에서 사용불가 SELECT SQL_BUFFER_RESULT ... FROM
SQL_CACHE 쿼리를 쿼리캐시(query_cache_type=2)에 캐시함 SELECT SQL_CACHE ... FROM
SQL_NO_CACHE 쿼리를 쿼리캐시에 캐시하지 않음 SELECT SQL_NO_CACHE ... FROM
SQL_CALC_FOUND_ROWS
LIMIT이 붙든 안붙든 모든 로우수를 계산시킴,
FOUND_ROWS()함수로 조회가능.
SELECT SQL_CALC_FOUND_ROWS ... FROM
HIGH_PRIORITY 테이블락을 지원하는(ex. Myisam)스토리지 엔진에서 사용,
해당 힌트가 명시된 문장을 락 대기 큐에서의 우선순위를
정함,
SELECT HIFH_PRIORITY ... FROM
LOW_PRIORITY SELECT LOW_PRIORITY ... FROM
DELAYED INSERT, REPLACE문장을 버퍼에 담아두고 한번에 처리 INSERT DELAYED INTO ...
© Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved.
Hint 사용법
ignore index(key|index) 사용 예제
mysql> explain select * from employees.employees where emp_no<30000
+----+-------------+-----------+------------+-------+---------------+---------+---------+------+-------+----------+-------------+
| id | select_type | table | partitions | type | possible_keys | key | key_len | ref | rows | filtered | Extra |
+----+-------------+-----------+------------+-------+---------------+---------+---------+------+-------+----------+-------------+
| 1 | SIMPLE | employees | NULL | range | PRIMARY | PRIMARY | 4 | NULL | 39392 | 100.00 | Using where |
+----+-------------+-----------+------------+-------+---------------+---------+---------+------+-------+----------+-------------+
mysql> explain select * from employees.employees ignore index(primary) where emp_no<30000;
+----+-------------+-----------+------------+------+---------------+------+---------+------+--------+----------+-------------+
| id | select_type | table | partitions | type | possible_keys | key | key_len | ref | rows | filtered | Extra |
+----+-------------+-----------+------------+------+---------------+------+---------+------+--------+----------+-------------+
| 1 | SIMPLE | employees | NULL | ALL | NULL | NULL | NULL | NULL| 299113 | 33.33 | Using where |
+----+-------------+-----------+------------+------+---------------+------+---------+------+--------+----------+-------------+
© Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved.
Hint 사용법
straight join 사용 예제
mysql> explain select * from employees,departments limit 1;
+----+-------------+-------------+------------+-------+---------------+-----------+---------+------+--------+----------+---------------------------------------+
| id | select_type | table | partitions | type | possible_keys | key | key_len | ref | rows | filtered | Extra |
+----+-------------+-------------+------------+-------+---------------+-----------+---------+------+--------+----------+---------------------------------------+
| 1 | SIMPLE | departments | NULL | index | NULL | dept_name | 122 | NULL | 9 | 100.00 | Using index |
| 1 | SIMPLE | employees | NULL | ALL | NULL | NULL | NULL | NULL | 299113 | 100.00 | Using join buffer (Block Nested Loop) |
+----+-------------+-------------+------------+-------+---------------+-----------+---------+------+--------+----------+---------------------------------------+
2 rows in set, 1 warning (0.00 sec)
mysql> explain select STRAIGHT_JOIN * from employees,departments limit 1;
+----+-------------+-------------+------------+-------+---------------+-----------+---------+------+--------+----------+----------------------------------------------------+
| id | select_type | table | partitions | type | possible_keys | key | key_len | ref | rows | filtered | Extra |
+----+-------------+-------------+------------+-------+---------------+-----------+---------+------+--------+----------+----------------------------------------------------+
| 1 | SIMPLE | employees | NULL | ALL | NULL | NULL | NULL | NULL | 299113 | 100.00 | NULL |
| 1 | SIMPLE | departments | NULL | index | NULL | dept_name | 122 | NULL | 9 | 100.00 | Using index; Using join buffer (Block Nested Loop) |
+----+-------------+-------------+------------+-------+---------------+-----------+---------+------+--------+----------+----------------------------------------------------+
2 rows in set, 1 warning (.00 sec)
© Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved.
Hint 사용법
SQL_CACHE 사용 예제
mysql> select * from employees.employees limit 100000;
mysql> show status like 'Qcache_inserts';
+----------------+-------+
| Variable_name | Value |
+----------------+-------+
| Qcache_inserts | 3 |
+----------------+-------+
mysql> select sql_cache * from employees.employees limit 100000;
mysql> show status like 'Qcache_inserts';
+----------------+-------+
| Variable_name | Value |
+----------------+-------+
| Qcache_inserts | 4 |
+----------------+-------+
© Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved.
Hint 사용법
NO_BNL 사용 예제
mysql> explain select * from departments join employees limit 1;
+----+-------------+-----------+------------+-------+---------------+-----------+---------+------+--------+----------+---------------------------------------+
| id | select_type | table | partitions | type | possible_keys | key | key_len | ref | rows | filtered | Extra |
+----+-------------+-----------+------------+-------+---------------+-----------+---------+------+--------+----------+---------------------------------------+
| 1 | SIMPLE | straight | NULL | index | NULL | dept_name | 122 | NULL | 9 | 100.00 | Using index |
| 1 | SIMPLE | employees | NULL | ALL | NULL | NULL | NULL | NULL | 299113 | 100.00 | Using join buffer (Block Nested Loop) |
+----+-------------+-----------+------------+-------+---------------+-----------+---------+------+--------+----------+---------------------------------------+
mysql> explain select /*+ no_bnl(employees) */ * from departments straight join employees limit 1;
+----+-------------+-----------+------------+-------+---------------+-----------+---------+------+--------+----------+-------------+
| id | select_type | table | partitions | type | possible_keys | key | key_len | ref | rows | filtered | Extra |
+----+-------------+-----------+------------+-------+---------------+-----------+---------+------+--------+----------+-------------+
| 1 | SIMPLE | straight | NULL | index | NULL | dept_name | 122 | NULL | 9 | 100.00 | Using index |
| 1 | SIMPLE | employees | NULL | ALL | NULL | NULL | NULL | NULL | 299113 | 100.00 | NULL |
+----+-------------+-----------+------------+-------+---------------+-----------+---------+------+--------+----------+-------------+
Research & Contents
Blog
Video
E-mail
NAVER http://cafe.naver.com/playexem
ITPUB http://blog.itpub.net/31135309/
Wordpress https://playexem.wordpress.com/
Slideshare http://www.slideshare.net/playexem
Youtube https://www.youtube.com/channel/UC5wKR
_-A0eL_Pn_EMzoauJg
Tudou http://www.tudou.com/home/maxgauge/
교육 문의: 연구컨텐츠팀 김숙진
edu@ex-em.com
© Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved.

More Related Content

What's hot

[Pgday.Seoul 2021] 1. 예제로 살펴보는 포스트그레스큐엘의 독특한 SQL
[Pgday.Seoul 2021] 1. 예제로 살펴보는 포스트그레스큐엘의 독특한 SQL[Pgday.Seoul 2021] 1. 예제로 살펴보는 포스트그레스큐엘의 독특한 SQL
[Pgday.Seoul 2021] 1. 예제로 살펴보는 포스트그레스큐엘의 독특한 SQLPgDay.Seoul
 
파이썬 데이터베이스 연결 1탄
파이썬 데이터베이스 연결 1탄파이썬 데이터베이스 연결 1탄
파이썬 데이터베이스 연결 1탄SeongHyun Ahn
 
파이썬 데이터베이스 연결 2탄
파이썬 데이터베이스 연결 2탄파이썬 데이터베이스 연결 2탄
파이썬 데이터베이스 연결 2탄SeongHyun Ahn
 
PostgreSQL Deep Internal
PostgreSQL Deep InternalPostgreSQL Deep Internal
PostgreSQL Deep InternalEXEM
 
PostgreSql vaccum
PostgreSql vaccumPostgreSql vaccum
PostgreSql vaccum승범 현
 
Pgday bdr 천정대
Pgday bdr 천정대Pgday bdr 천정대
Pgday bdr 천정대PgDay.Seoul
 
MySQL GTID 시작하기
MySQL GTID 시작하기MySQL GTID 시작하기
MySQL GTID 시작하기I Goo Lee
 
Federated Engine 실무적용사례
Federated Engine 실무적용사례Federated Engine 실무적용사례
Federated Engine 실무적용사례I Goo Lee
 
파이썬 웹프로그래밍 1탄
파이썬 웹프로그래밍 1탄 파이썬 웹프로그래밍 1탄
파이썬 웹프로그래밍 1탄 SeongHyun Ahn
 
Enterprise Linux 7 new feature_systemd_booting
Enterprise Linux 7 new feature_systemd_bootingEnterprise Linux 7 new feature_systemd_booting
Enterprise Linux 7 new feature_systemd_bootingsuk kim
 
[Pgday.Seoul 2017] 8. PostgreSQL 10 새기능 소개 - 김상기
[Pgday.Seoul 2017] 8. PostgreSQL 10 새기능 소개 - 김상기[Pgday.Seoul 2017] 8. PostgreSQL 10 새기능 소개 - 김상기
[Pgday.Seoul 2017] 8. PostgreSQL 10 새기능 소개 - 김상기PgDay.Seoul
 
[오픈소스컨설팅]systemd on RHEL7
[오픈소스컨설팅]systemd on RHEL7[오픈소스컨설팅]systemd on RHEL7
[오픈소스컨설팅]systemd on RHEL7Ji-Woong Choi
 
SQL Profile을 이용한 SQL Plan 변경_Wh oracle
SQL Profile을 이용한 SQL Plan 변경_Wh oracleSQL Profile을 이용한 SQL Plan 변경_Wh oracle
SQL Profile을 이용한 SQL Plan 변경_Wh oracle엑셈
 
ORACLE EXADATA HCC 압축방식 이해하기_Wh oracle
ORACLE EXADATA HCC 압축방식 이해하기_Wh oracleORACLE EXADATA HCC 압축방식 이해하기_Wh oracle
ORACLE EXADATA HCC 압축방식 이해하기_Wh oracle엑셈
 
MySQL 상태 메시지 분석 및 활용
MySQL 상태 메시지 분석 및 활용MySQL 상태 메시지 분석 및 활용
MySQL 상태 메시지 분석 및 활용I Goo Lee
 
Rhel7 beta information
Rhel7 beta informationRhel7 beta information
Rhel7 beta information현익 박
 
[2015-06-26] Oracle 성능 최적화 및 품질 고도화 3
[2015-06-26] Oracle 성능 최적화 및 품질 고도화 3[2015-06-26] Oracle 성능 최적화 및 품질 고도화 3
[2015-06-26] Oracle 성능 최적화 및 품질 고도화 3Seok-joon Yun
 
[2015-07-10-윤석준] Oracle 성능 관리 & v$sysstat
[2015-07-10-윤석준] Oracle 성능 관리 & v$sysstat[2015-07-10-윤석준] Oracle 성능 관리 & v$sysstat
[2015-07-10-윤석준] Oracle 성능 관리 & v$sysstatSeok-joon Yun
 
Result Cache 동작원리 및 활용방안_Wh oracle
Result Cache 동작원리 및 활용방안_Wh oracleResult Cache 동작원리 및 활용방안_Wh oracle
Result Cache 동작원리 및 활용방안_Wh oracle엑셈
 

What's hot (20)

[Pgday.Seoul 2021] 1. 예제로 살펴보는 포스트그레스큐엘의 독특한 SQL
[Pgday.Seoul 2021] 1. 예제로 살펴보는 포스트그레스큐엘의 독특한 SQL[Pgday.Seoul 2021] 1. 예제로 살펴보는 포스트그레스큐엘의 독특한 SQL
[Pgday.Seoul 2021] 1. 예제로 살펴보는 포스트그레스큐엘의 독특한 SQL
 
파이썬 데이터베이스 연결 1탄
파이썬 데이터베이스 연결 1탄파이썬 데이터베이스 연결 1탄
파이썬 데이터베이스 연결 1탄
 
파이썬 데이터베이스 연결 2탄
파이썬 데이터베이스 연결 2탄파이썬 데이터베이스 연결 2탄
파이썬 데이터베이스 연결 2탄
 
PostgreSQL Deep Internal
PostgreSQL Deep InternalPostgreSQL Deep Internal
PostgreSQL Deep Internal
 
PostgreSql vaccum
PostgreSql vaccumPostgreSql vaccum
PostgreSql vaccum
 
Pgday bdr 천정대
Pgday bdr 천정대Pgday bdr 천정대
Pgday bdr 천정대
 
MySQL GTID 시작하기
MySQL GTID 시작하기MySQL GTID 시작하기
MySQL GTID 시작하기
 
Federated Engine 실무적용사례
Federated Engine 실무적용사례Federated Engine 실무적용사례
Federated Engine 실무적용사례
 
파이썬 웹프로그래밍 1탄
파이썬 웹프로그래밍 1탄 파이썬 웹프로그래밍 1탄
파이썬 웹프로그래밍 1탄
 
Enterprise Linux 7 new feature_systemd_booting
Enterprise Linux 7 new feature_systemd_bootingEnterprise Linux 7 new feature_systemd_booting
Enterprise Linux 7 new feature_systemd_booting
 
[Pgday.Seoul 2017] 8. PostgreSQL 10 새기능 소개 - 김상기
[Pgday.Seoul 2017] 8. PostgreSQL 10 새기능 소개 - 김상기[Pgday.Seoul 2017] 8. PostgreSQL 10 새기능 소개 - 김상기
[Pgday.Seoul 2017] 8. PostgreSQL 10 새기능 소개 - 김상기
 
[오픈소스컨설팅]systemd on RHEL7
[오픈소스컨설팅]systemd on RHEL7[오픈소스컨설팅]systemd on RHEL7
[오픈소스컨설팅]systemd on RHEL7
 
(오라클힌트/SQL튜닝 강좌)쿼리튜닝을 위한 오라클의 10053 이벤트
(오라클힌트/SQL튜닝 강좌)쿼리튜닝을 위한 오라클의 10053 이벤트(오라클힌트/SQL튜닝 강좌)쿼리튜닝을 위한 오라클의 10053 이벤트
(오라클힌트/SQL튜닝 강좌)쿼리튜닝을 위한 오라클의 10053 이벤트
 
SQL Profile을 이용한 SQL Plan 변경_Wh oracle
SQL Profile을 이용한 SQL Plan 변경_Wh oracleSQL Profile을 이용한 SQL Plan 변경_Wh oracle
SQL Profile을 이용한 SQL Plan 변경_Wh oracle
 
ORACLE EXADATA HCC 압축방식 이해하기_Wh oracle
ORACLE EXADATA HCC 압축방식 이해하기_Wh oracleORACLE EXADATA HCC 압축방식 이해하기_Wh oracle
ORACLE EXADATA HCC 압축방식 이해하기_Wh oracle
 
MySQL 상태 메시지 분석 및 활용
MySQL 상태 메시지 분석 및 활용MySQL 상태 메시지 분석 및 활용
MySQL 상태 메시지 분석 및 활용
 
Rhel7 beta information
Rhel7 beta informationRhel7 beta information
Rhel7 beta information
 
[2015-06-26] Oracle 성능 최적화 및 품질 고도화 3
[2015-06-26] Oracle 성능 최적화 및 품질 고도화 3[2015-06-26] Oracle 성능 최적화 및 품질 고도화 3
[2015-06-26] Oracle 성능 최적화 및 품질 고도화 3
 
[2015-07-10-윤석준] Oracle 성능 관리 & v$sysstat
[2015-07-10-윤석준] Oracle 성능 관리 & v$sysstat[2015-07-10-윤석준] Oracle 성능 관리 & v$sysstat
[2015-07-10-윤석준] Oracle 성능 관리 & v$sysstat
 
Result Cache 동작원리 및 활용방안_Wh oracle
Result Cache 동작원리 및 활용방안_Wh oracleResult Cache 동작원리 및 활용방안_Wh oracle
Result Cache 동작원리 및 활용방안_Wh oracle
 

Viewers also liked

Performance schema 설정
Performance schema 설정Performance schema 설정
Performance schema 설정EXEM
 
제 6회 엑셈 수요 세미나 자료 연구컨텐츠팀
제 6회 엑셈 수요 세미나 자료 연구컨텐츠팀제 6회 엑셈 수요 세미나 자료 연구컨텐츠팀
제 6회 엑셈 수요 세미나 자료 연구컨텐츠팀EXEM
 
Oracle Deep Internal 2 (ver.2)
Oracle Deep Internal 2 (ver.2)Oracle Deep Internal 2 (ver.2)
Oracle Deep Internal 2 (ver.2)EXEM
 
Oracle Deep Internal 3 (ver.2)
Oracle Deep Internal 3 (ver.2)Oracle Deep Internal 3 (ver.2)
Oracle Deep Internal 3 (ver.2)EXEM
 
제 8회 엑셈 수요 세미나 자료 연구컨텐츠팀
제 8회 엑셈 수요 세미나 자료 연구컨텐츠팀제 8회 엑셈 수요 세미나 자료 연구컨텐츠팀
제 8회 엑셈 수요 세미나 자료 연구컨텐츠팀EXEM
 
【中文】 odi no.004 analysis of oracle performance degradation caused by ineffi...
【中文】   odi no.004 analysis of oracle performance degradation caused by ineffi...【中文】   odi no.004 analysis of oracle performance degradation caused by ineffi...
【中文】 odi no.004 analysis of oracle performance degradation caused by ineffi...EXEM
 
Oracle Deep Internal 4 (ver.2)
Oracle Deep Internal 4 (ver.2)Oracle Deep Internal 4 (ver.2)
Oracle Deep Internal 4 (ver.2)EXEM
 
[MySQL 스터디] 기타기능
[MySQL 스터디] 기타기능[MySQL 스터디] 기타기능
[MySQL 스터디] 기타기능Jong Ho Park
 
2009년 시무식 Apm
2009년 시무식 Apm2009년 시무식 Apm
2009년 시무식 ApmEXEM
 
밋업발표
밋업발표밋업발표
밋업발표진성 박
 
Oracle Deep Internal 3 (ver.2)
Oracle Deep Internal 3 (ver.2)Oracle Deep Internal 3 (ver.2)
Oracle Deep Internal 3 (ver.2)EXEM
 
Oracle Deep Internal 1 (ver.2)
Oracle Deep Internal 1 (ver.2)Oracle Deep Internal 1 (ver.2)
Oracle Deep Internal 1 (ver.2)EXEM
 
The Great Debate: PostgreSQL vs MySQL
The Great Debate: PostgreSQL vs MySQLThe Great Debate: PostgreSQL vs MySQL
The Great Debate: PostgreSQL vs MySQLEDB
 
Apache tomcat 로드밸런싱 김태호-20140808
Apache tomcat 로드밸런싱 김태호-20140808Apache tomcat 로드밸런싱 김태호-20140808
Apache tomcat 로드밸런싱 김태호-20140808Taeho Kim
 
PostgreSQL Performance Tuning
PostgreSQL Performance TuningPostgreSQL Performance Tuning
PostgreSQL Performance Tuningelliando dias
 
『프로젝트 성패를 결정짓는 데이터 모델링 이야기』 - 미리보기
『프로젝트 성패를 결정짓는 데이터 모델링 이야기』 - 미리보기『프로젝트 성패를 결정짓는 데이터 모델링 이야기』 - 미리보기
『프로젝트 성패를 결정짓는 데이터 모델링 이야기』 - 미리보기복연 이
 
Postgres Presentation
Postgres PresentationPostgres Presentation
Postgres Presentationgisborne
 
Data Processing Inside PostgreSQL
Data Processing Inside PostgreSQLData Processing Inside PostgreSQL
Data Processing Inside PostgreSQLEDB
 

Viewers also liked (20)

Performance schema 설정
Performance schema 설정Performance schema 설정
Performance schema 설정
 
제 6회 엑셈 수요 세미나 자료 연구컨텐츠팀
제 6회 엑셈 수요 세미나 자료 연구컨텐츠팀제 6회 엑셈 수요 세미나 자료 연구컨텐츠팀
제 6회 엑셈 수요 세미나 자료 연구컨텐츠팀
 
Oracle Deep Internal 2 (ver.2)
Oracle Deep Internal 2 (ver.2)Oracle Deep Internal 2 (ver.2)
Oracle Deep Internal 2 (ver.2)
 
Oracle Deep Internal 3 (ver.2)
Oracle Deep Internal 3 (ver.2)Oracle Deep Internal 3 (ver.2)
Oracle Deep Internal 3 (ver.2)
 
제 8회 엑셈 수요 세미나 자료 연구컨텐츠팀
제 8회 엑셈 수요 세미나 자료 연구컨텐츠팀제 8회 엑셈 수요 세미나 자료 연구컨텐츠팀
제 8회 엑셈 수요 세미나 자료 연구컨텐츠팀
 
test
testtest
test
 
【中文】 odi no.004 analysis of oracle performance degradation caused by ineffi...
【中文】   odi no.004 analysis of oracle performance degradation caused by ineffi...【中文】   odi no.004 analysis of oracle performance degradation caused by ineffi...
【中文】 odi no.004 analysis of oracle performance degradation caused by ineffi...
 
Oracle Deep Internal 4 (ver.2)
Oracle Deep Internal 4 (ver.2)Oracle Deep Internal 4 (ver.2)
Oracle Deep Internal 4 (ver.2)
 
[MySQL 스터디] 기타기능
[MySQL 스터디] 기타기능[MySQL 스터디] 기타기능
[MySQL 스터디] 기타기능
 
2009년 시무식 Apm
2009년 시무식 Apm2009년 시무식 Apm
2009년 시무식 Apm
 
밋업발표
밋업발표밋업발표
밋업발표
 
Oracle Deep Internal 3 (ver.2)
Oracle Deep Internal 3 (ver.2)Oracle Deep Internal 3 (ver.2)
Oracle Deep Internal 3 (ver.2)
 
Oracle Deep Internal 1 (ver.2)
Oracle Deep Internal 1 (ver.2)Oracle Deep Internal 1 (ver.2)
Oracle Deep Internal 1 (ver.2)
 
XDebug For php debugging
XDebug For php debuggingXDebug For php debugging
XDebug For php debugging
 
The Great Debate: PostgreSQL vs MySQL
The Great Debate: PostgreSQL vs MySQLThe Great Debate: PostgreSQL vs MySQL
The Great Debate: PostgreSQL vs MySQL
 
Apache tomcat 로드밸런싱 김태호-20140808
Apache tomcat 로드밸런싱 김태호-20140808Apache tomcat 로드밸런싱 김태호-20140808
Apache tomcat 로드밸런싱 김태호-20140808
 
PostgreSQL Performance Tuning
PostgreSQL Performance TuningPostgreSQL Performance Tuning
PostgreSQL Performance Tuning
 
『프로젝트 성패를 결정짓는 데이터 모델링 이야기』 - 미리보기
『프로젝트 성패를 결정짓는 데이터 모델링 이야기』 - 미리보기『프로젝트 성패를 결정짓는 데이터 모델링 이야기』 - 미리보기
『프로젝트 성패를 결정짓는 데이터 모델링 이야기』 - 미리보기
 
Postgres Presentation
Postgres PresentationPostgres Presentation
Postgres Presentation
 
Data Processing Inside PostgreSQL
Data Processing Inside PostgreSQLData Processing Inside PostgreSQL
Data Processing Inside PostgreSQL
 

Similar to 제 7회 엑셈 수요 세미나 자료 연구컨텐츠팀

효율적인Sql작성방법 3주차
효율적인Sql작성방법 3주차효율적인Sql작성방법 3주차
효율적인Sql작성방법 3주차희동 강
 
NLJ BATCH와 부분범위 처리_Wh oracle
NLJ BATCH와 부분범위 처리_Wh oracleNLJ BATCH와 부분범위 처리_Wh oracle
NLJ BATCH와 부분범위 처리_Wh oracle엑셈
 
07 스레드스케줄링,우선순위,그리고선호도
07 스레드스케줄링,우선순위,그리고선호도07 스레드스케줄링,우선순위,그리고선호도
07 스레드스케줄링,우선순위,그리고선호도ssuser3fb17c
 
[2015-06-12] Oracle 성능 최적화 및 품질 고도화 1
[2015-06-12] Oracle 성능 최적화 및 품질 고도화 1[2015-06-12] Oracle 성능 최적화 및 품질 고도화 1
[2015-06-12] Oracle 성능 최적화 및 품질 고도화 1Seok-joon Yun
 
[오픈소스컨설팅]Java Performance Tuning
[오픈소스컨설팅]Java Performance Tuning[오픈소스컨설팅]Java Performance Tuning
[오픈소스컨설팅]Java Performance TuningJi-Woong Choi
 
Gpdb best practices v a01 20150313
Gpdb best practices v a01 20150313Gpdb best practices v a01 20150313
Gpdb best practices v a01 20150313Sanghee Lee
 
[231]운영체제 수준에서의 데이터베이스 성능 분석과 최적화
[231]운영체제 수준에서의 데이터베이스 성능 분석과 최적화[231]운영체제 수준에서의 데이터베이스 성능 분석과 최적화
[231]운영체제 수준에서의 데이터베이스 성능 분석과 최적화NAVER D2
 
Confd, systemd, fleet을 이용한 어플리케이션 배포 in CoreOS
Confd, systemd, fleet을 이용한 어플리케이션 배포 in CoreOSConfd, systemd, fleet을 이용한 어플리케이션 배포 in CoreOS
Confd, systemd, fleet을 이용한 어플리케이션 배포 in CoreOS충섭 김
 
[143] Modern C++ 무조건 써야 해?
[143] Modern C++ 무조건 써야 해?[143] Modern C++ 무조건 써야 해?
[143] Modern C++ 무조건 써야 해?NAVER D2
 
Vectorized processing in_a_nutshell_DeView2014
Vectorized processing in_a_nutshell_DeView2014Vectorized processing in_a_nutshell_DeView2014
Vectorized processing in_a_nutshell_DeView2014Gruter
 
Database 튜닝 교육 110124
Database 튜닝 교육 110124Database 튜닝 교육 110124
Database 튜닝 교육 110124한 경만
 
Web Analytics at Scale with Elasticsearch @ naver.com - Part 2 - Lessons Learned
Web Analytics at Scale with Elasticsearch @ naver.com - Part 2 - Lessons LearnedWeb Analytics at Scale with Elasticsearch @ naver.com - Part 2 - Lessons Learned
Web Analytics at Scale with Elasticsearch @ naver.com - Part 2 - Lessons LearnedJungsu Heo
 
[2B7]시즌2 멀티쓰레드프로그래밍이 왜 이리 힘드나요
[2B7]시즌2 멀티쓰레드프로그래밍이 왜 이리 힘드나요[2B7]시즌2 멀티쓰레드프로그래밍이 왜 이리 힘드나요
[2B7]시즌2 멀티쓰레드프로그래밍이 왜 이리 힘드나요NAVER D2
 
AWS CLOUD 2018- Amazon Aurora  신규 서비스 알아보기 (최유정 솔루션즈 아키텍트)
AWS CLOUD 2018- Amazon Aurora  신규 서비스 알아보기 (최유정 솔루션즈 아키텍트)AWS CLOUD 2018- Amazon Aurora  신규 서비스 알아보기 (최유정 솔루션즈 아키텍트)
AWS CLOUD 2018- Amazon Aurora  신규 서비스 알아보기 (최유정 솔루션즈 아키텍트)Amazon Web Services Korea
 
오라클 DB를 AWS 데이터베이스로 마이그레이션 하기 - 윤기원 :: AWS Database Modernization Day 온라인
오라클 DB를 AWS 데이터베이스로 마이그레이션 하기 - 윤기원 :: AWS Database Modernization Day 온라인오라클 DB를 AWS 데이터베이스로 마이그레이션 하기 - 윤기원 :: AWS Database Modernization Day 온라인
오라클 DB를 AWS 데이터베이스로 마이그레이션 하기 - 윤기원 :: AWS Database Modernization Day 온라인Amazon Web Services Korea
 
android_thread
android_threadandroid_thread
android_threadhandfoot
 
Optimizing the graphics_pipeline_
Optimizing the graphics_pipeline_Optimizing the graphics_pipeline_
Optimizing the graphics_pipeline_ozlael ozlael
 
Ssd 성능시험 cubrid mysql
Ssd 성능시험 cubrid mysqlSsd 성능시험 cubrid mysql
Ssd 성능시험 cubrid mysqlswkim79
 

Similar to 제 7회 엑셈 수요 세미나 자료 연구컨텐츠팀 (20)

효율적인Sql작성방법 3주차
효율적인Sql작성방법 3주차효율적인Sql작성방법 3주차
효율적인Sql작성방법 3주차
 
ES6 for Node.js Study 2주차
ES6 for Node.js Study 2주차ES6 for Node.js Study 2주차
ES6 for Node.js Study 2주차
 
NLJ BATCH와 부분범위 처리_Wh oracle
NLJ BATCH와 부분범위 처리_Wh oracleNLJ BATCH와 부분범위 처리_Wh oracle
NLJ BATCH와 부분범위 처리_Wh oracle
 
07 스레드스케줄링,우선순위,그리고선호도
07 스레드스케줄링,우선순위,그리고선호도07 스레드스케줄링,우선순위,그리고선호도
07 스레드스케줄링,우선순위,그리고선호도
 
[2015-06-12] Oracle 성능 최적화 및 품질 고도화 1
[2015-06-12] Oracle 성능 최적화 및 품질 고도화 1[2015-06-12] Oracle 성능 최적화 및 품질 고도화 1
[2015-06-12] Oracle 성능 최적화 및 품질 고도화 1
 
[오픈소스컨설팅]Java Performance Tuning
[오픈소스컨설팅]Java Performance Tuning[오픈소스컨설팅]Java Performance Tuning
[오픈소스컨설팅]Java Performance Tuning
 
Gpdb best practices v a01 20150313
Gpdb best practices v a01 20150313Gpdb best practices v a01 20150313
Gpdb best practices v a01 20150313
 
[231]운영체제 수준에서의 데이터베이스 성능 분석과 최적화
[231]운영체제 수준에서의 데이터베이스 성능 분석과 최적화[231]운영체제 수준에서의 데이터베이스 성능 분석과 최적화
[231]운영체제 수준에서의 데이터베이스 성능 분석과 최적화
 
Confd, systemd, fleet을 이용한 어플리케이션 배포 in CoreOS
Confd, systemd, fleet을 이용한 어플리케이션 배포 in CoreOSConfd, systemd, fleet을 이용한 어플리케이션 배포 in CoreOS
Confd, systemd, fleet을 이용한 어플리케이션 배포 in CoreOS
 
Gcd ppt
Gcd pptGcd ppt
Gcd ppt
 
[143] Modern C++ 무조건 써야 해?
[143] Modern C++ 무조건 써야 해?[143] Modern C++ 무조건 써야 해?
[143] Modern C++ 무조건 써야 해?
 
Vectorized processing in_a_nutshell_DeView2014
Vectorized processing in_a_nutshell_DeView2014Vectorized processing in_a_nutshell_DeView2014
Vectorized processing in_a_nutshell_DeView2014
 
Database 튜닝 교육 110124
Database 튜닝 교육 110124Database 튜닝 교육 110124
Database 튜닝 교육 110124
 
Web Analytics at Scale with Elasticsearch @ naver.com - Part 2 - Lessons Learned
Web Analytics at Scale with Elasticsearch @ naver.com - Part 2 - Lessons LearnedWeb Analytics at Scale with Elasticsearch @ naver.com - Part 2 - Lessons Learned
Web Analytics at Scale with Elasticsearch @ naver.com - Part 2 - Lessons Learned
 
[2B7]시즌2 멀티쓰레드프로그래밍이 왜 이리 힘드나요
[2B7]시즌2 멀티쓰레드프로그래밍이 왜 이리 힘드나요[2B7]시즌2 멀티쓰레드프로그래밍이 왜 이리 힘드나요
[2B7]시즌2 멀티쓰레드프로그래밍이 왜 이리 힘드나요
 
AWS CLOUD 2018- Amazon Aurora  신규 서비스 알아보기 (최유정 솔루션즈 아키텍트)
AWS CLOUD 2018- Amazon Aurora  신규 서비스 알아보기 (최유정 솔루션즈 아키텍트)AWS CLOUD 2018- Amazon Aurora  신규 서비스 알아보기 (최유정 솔루션즈 아키텍트)
AWS CLOUD 2018- Amazon Aurora  신규 서비스 알아보기 (최유정 솔루션즈 아키텍트)
 
오라클 DB를 AWS 데이터베이스로 마이그레이션 하기 - 윤기원 :: AWS Database Modernization Day 온라인
오라클 DB를 AWS 데이터베이스로 마이그레이션 하기 - 윤기원 :: AWS Database Modernization Day 온라인오라클 DB를 AWS 데이터베이스로 마이그레이션 하기 - 윤기원 :: AWS Database Modernization Day 온라인
오라클 DB를 AWS 데이터베이스로 마이그레이션 하기 - 윤기원 :: AWS Database Modernization Day 온라인
 
android_thread
android_threadandroid_thread
android_thread
 
Optimizing the graphics_pipeline_
Optimizing the graphics_pipeline_Optimizing the graphics_pipeline_
Optimizing the graphics_pipeline_
 
Ssd 성능시험 cubrid mysql
Ssd 성능시험 cubrid mysqlSsd 성능시험 cubrid mysql
Ssd 성능시험 cubrid mysql
 

More from EXEM

Amazon aurora 1
Amazon aurora 1Amazon aurora 1
Amazon aurora 1EXEM
 
[KOR] ODI no.004 analysis of oracle performance degradation caused by ineffic...
[KOR] ODI no.004 analysis of oracle performance degradation caused by ineffic...[KOR] ODI no.004 analysis of oracle performance degradation caused by ineffic...
[KOR] ODI no.004 analysis of oracle performance degradation caused by ineffic...EXEM
 
[ODI] chapter3 What is Max CR DBA(Max length)?
[ODI] chapter3 What is Max CR DBA(Max length)? [ODI] chapter3 What is Max CR DBA(Max length)?
[ODI] chapter3 What is Max CR DBA(Max length)? EXEM
 
[ODI] chapter2 what is "undo record chaining"?
[ODI] chapter2 what is "undo record chaining"?[ODI] chapter2 what is "undo record chaining"?
[ODI] chapter2 what is "undo record chaining"?EXEM
 
[ODI] chapter1 When Update statement is executed, How does oracle undo work?
[ODI] chapter1 When Update statement is executed,  How does oracle undo work?[ODI] chapter1 When Update statement is executed,  How does oracle undo work?
[ODI] chapter1 When Update statement is executed, How does oracle undo work?EXEM
 
[Practical owi] lock & latch
[Practical owi] lock & latch[Practical owi] lock & latch
[Practical owi] lock & latchEXEM
 

More from EXEM (6)

Amazon aurora 1
Amazon aurora 1Amazon aurora 1
Amazon aurora 1
 
[KOR] ODI no.004 analysis of oracle performance degradation caused by ineffic...
[KOR] ODI no.004 analysis of oracle performance degradation caused by ineffic...[KOR] ODI no.004 analysis of oracle performance degradation caused by ineffic...
[KOR] ODI no.004 analysis of oracle performance degradation caused by ineffic...
 
[ODI] chapter3 What is Max CR DBA(Max length)?
[ODI] chapter3 What is Max CR DBA(Max length)? [ODI] chapter3 What is Max CR DBA(Max length)?
[ODI] chapter3 What is Max CR DBA(Max length)?
 
[ODI] chapter2 what is "undo record chaining"?
[ODI] chapter2 what is "undo record chaining"?[ODI] chapter2 what is "undo record chaining"?
[ODI] chapter2 what is "undo record chaining"?
 
[ODI] chapter1 When Update statement is executed, How does oracle undo work?
[ODI] chapter1 When Update statement is executed,  How does oracle undo work?[ODI] chapter1 When Update statement is executed,  How does oracle undo work?
[ODI] chapter1 When Update statement is executed, How does oracle undo work?
 
[Practical owi] lock & latch
[Practical owi] lock & latch[Practical owi] lock & latch
[Practical owi] lock & latch
 

Recently uploaded

Console API (Kitworks Team Study 백혜인 발표자료)
Console API (Kitworks Team Study 백혜인 발표자료)Console API (Kitworks Team Study 백혜인 발표자료)
Console API (Kitworks Team Study 백혜인 발표자료)Wonjun Hwang
 
Merge (Kitworks Team Study 이성수 발표자료 240426)
Merge (Kitworks Team Study 이성수 발표자료 240426)Merge (Kitworks Team Study 이성수 발표자료 240426)
Merge (Kitworks Team Study 이성수 발표자료 240426)Wonjun Hwang
 
A future that integrates LLMs and LAMs (Symposium)
A future that integrates LLMs and LAMs (Symposium)A future that integrates LLMs and LAMs (Symposium)
A future that integrates LLMs and LAMs (Symposium)Tae Young Lee
 
캐드앤그래픽스 2024년 5월호 목차
캐드앤그래픽스 2024년 5월호 목차캐드앤그래픽스 2024년 5월호 목차
캐드앤그래픽스 2024년 5월호 목차캐드앤그래픽스
 
Continual Active Learning for Efficient Adaptation of Machine LearningModels ...
Continual Active Learning for Efficient Adaptation of Machine LearningModels ...Continual Active Learning for Efficient Adaptation of Machine LearningModels ...
Continual Active Learning for Efficient Adaptation of Machine LearningModels ...Kim Daeun
 
MOODv2 : Masked Image Modeling for Out-of-Distribution Detection
MOODv2 : Masked Image Modeling for Out-of-Distribution DetectionMOODv2 : Masked Image Modeling for Out-of-Distribution Detection
MOODv2 : Masked Image Modeling for Out-of-Distribution DetectionKim Daeun
 

Recently uploaded (6)

Console API (Kitworks Team Study 백혜인 발표자료)
Console API (Kitworks Team Study 백혜인 발표자료)Console API (Kitworks Team Study 백혜인 발표자료)
Console API (Kitworks Team Study 백혜인 발표자료)
 
Merge (Kitworks Team Study 이성수 발표자료 240426)
Merge (Kitworks Team Study 이성수 발표자료 240426)Merge (Kitworks Team Study 이성수 발표자료 240426)
Merge (Kitworks Team Study 이성수 발표자료 240426)
 
A future that integrates LLMs and LAMs (Symposium)
A future that integrates LLMs and LAMs (Symposium)A future that integrates LLMs and LAMs (Symposium)
A future that integrates LLMs and LAMs (Symposium)
 
캐드앤그래픽스 2024년 5월호 목차
캐드앤그래픽스 2024년 5월호 목차캐드앤그래픽스 2024년 5월호 목차
캐드앤그래픽스 2024년 5월호 목차
 
Continual Active Learning for Efficient Adaptation of Machine LearningModels ...
Continual Active Learning for Efficient Adaptation of Machine LearningModels ...Continual Active Learning for Efficient Adaptation of Machine LearningModels ...
Continual Active Learning for Efficient Adaptation of Machine LearningModels ...
 
MOODv2 : Masked Image Modeling for Out-of-Distribution Detection
MOODv2 : Masked Image Modeling for Out-of-Distribution DetectionMOODv2 : Masked Image Modeling for Out-of-Distribution Detection
MOODv2 : Masked Image Modeling for Out-of-Distribution Detection
 

제 7회 엑셈 수요 세미나 자료 연구컨텐츠팀

  • 1. 제 7회 엑셈 수요 세미나 자료 EXEM seminar report no. 007 (2016.07.06) Research & Contents Team
  • 2. Table of Agenda © Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved. 01. 02. 03. [PostgreSQL] Vacuum의 거의 모든 것 (3차) [MySQL] Page와 Undo page deep internal 분석 [MySQL] Hint 사용법
  • 3. © Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved. 01. [PostgreSQL] Vacuum의 거의 모든 것 (3차) 발표자: 연구컨텐츠팀 김숙진
  • 4. © Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved. 목차 1차 1) Vacuum 정의 및 필요성 2) Vacuum 실행 구조 3) 표준 Vacuum VS Vacuum full (시나리오) 2차 1) dump로 보는 “표준 Vacuum VS Vacuum full” [PostgreSQL] Vacuum의 거의 모든 것 3차 1) XID wraparound and freezing tuple 2) Autovacuum
  • 5. © Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved. 1. XID Wraparound and Freezing Tuple • 트랜잭션에 대한 MVCC 기법: XID(트랜잭션 ID)를 숫자로 처리하고 비교 • 232 까지 표현이 가능 (대략 40억) • 40억 트랜잭션: 옛 XID(20억) + 새 XID(20억) • 옛 XID 20억은 보이고, 새 XID 20억은 안보이게 처리 • 계속 순환하면서 사용 출처: http://www.slideshare.net/pgdayasia/introduction-to-vacuum-freezing-and-xid 새 XID(20억) 옛 XID(20억) Visible ( Invisible )
  • 6. © Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved. 1. XID Wraparound and Freezing Tuple • XID wraparound 때문에 오래된 데이터에 대한 손실 발생 • Insert–only 테이블에서만 발생 출처: http://www.slideshare.net/hadoopxnttdata/postgresql-xid-wraparound-another-issue 과거(visible) 미래(invisible) Visible Visible Invisible
  • 7. © Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved. 1. XID Wraparound and Freezing Tuple • 튜플을 “FREEZE”로 표시하고, 이 FrozenXID는 일반 XID 비교 대상에서 항상 제외되어 항상 보여짐 • 20억 트랜잭션이 생기기 전에 FrozenXID 즉, 영구 보관용 자료로 변경하면 XID 겹침 오류 방지 • 이러한 변경 작업(data freezing)은 VACUUM FREEZE 명령으로 처리 출처: http://www.slideshare.net/hadoopxnttdata/postgresql-xid-wraparound-another-issue 과거(visible) 미래(invisible) Visible VisibleVisible
  • 8. © Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved. 1. XID Wraparound and Freezing Tuple Skip 되는 블록 pg_class 테이블의 relfrozenxid 칼럼값 : VACUUM 작업으로 그 테이블 전체에 대해서 XID 정리 작업을 했던 트랜잭션 ID 값 출처: http://www.slideshare.net/hadoopxnttdata/postgresql-xid-wraparound-another-issue
  • 9. © Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved. 1. XID Wraparound and Freezing Tuple 출처: http://www.slideshare.net/pgdayasia/introduction-to-vacuum-freezing-and-xid 20억 2억 1.5억 autovacuum 데몬에 의해 강제로 테이블의 모든 페이지를 조사해서 트랜잭션 ID 겹침 오류를 방지 • Table age가 (vacuum_freeze_table_age – vacuum_freeze_min_age)보다 크면, 모든 페이지를 검사해서 변경 작업을 진행 VACUUM 작업에서 모든 페이지를 대상 으로 이 XID 변경 작업을 할 것인지 결정 가능 0으로 지정하면, VM 확인하지 않고 항상 모든 페이지 검사 최대값: autovacuum_freeze_max_age * 0.95
  • 10. © Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved. 1. XID Wraparound and Freezing Tuple 출처: http://www.slideshare.net/pgdayasia/introduction-to-vacuum-freezing-and-xid 20억 2억 1.5억 이 시점에서는 표준 VACUUM이 실행됨
  • 11. © Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved. 1. XID Wraparound and Freezing Tuple 출처: http://www.slideshare.net/pgdayasia/introduction-to-vacuum-freezing-and-xid 20억 2억 1.5억 이 시점에서 VACUUM 작업을 하면 anti-wraparound VACUUM이 실행됨
  • 12. © Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved. 1. XID Wraparound and Freezing Tuple FrozenXID로 바꾸기 전 옛 XID를 얼마나 남길 것인가 지정 anti-wraparound VACUUM 후에는 relfrozenxid 값이 업데이트됨 출처: http://www.slideshare.net/pgdayasia/introduction-to-vacuum-freezing-and-xid
  • 13. © Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved. 20억 2억 1.5억 1. XID Wraparound and Freezing Tuple • 한 테이블이 vacuum 작업 없이 계속 트랜잭션 작업할 수 있는 간격 : 마지막 vacuum 이후부터, 20억 – vacuum_freeze_min_age 값만큼의 트랜잭션 • 트랜잭션 발생, vacuum 작업 없다면 데이터 손실 Autovacuum 기능을 사용하지 않더라도, autovacuum_freeze_max_age 지정 간격으로 vacuum 작업 진행 • 한 테이블에 대해 vacuum 작업이 한번도 하지 않았다면, (Autovacuum_freeze_max_age – vacuum_freeze_min_age) 값 만큼의 트랜잭션 발생 시, autovacuum 자동 진행
  • 14. © Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved. 2. Autovacuum Autovacuum launcher Autovacuum_naptime 값으로 지정한 초 간격으로 한 번에 하나의 데 이터베이스를 작업할 수 있도록 worker 프로세스의 실행 시간을 관리 Autovacuum workers Autovacuum_max_workers worker 프로세스 최대 개수 AUTOVACUUM이란? VACUUM 명령과 ANALYZE 명령을 주기적으로 자동 실행 • 주기적인 표준 Vacuum 작업을 하여 빈 공간을 확보하여 최대한 Vacuum Full 작업을 방지 • 최소의 디스크를 쓰는 것이 아닌 최적의 디스크 공간만 사용 출처: http://www.slideshare.net/alexeylesovsky/deep-dive-into-postgresql-statistics-60849690
  • 15. © Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved. 2. Autovacuum • Autovacuum 데몬은 이러한 예상치 못한 상황에 대해 자동으로 Vacuum 작업을 진행하여 위와 같은 문제를 피할 수 있음 • 정확한 데이터베이스 사용량을 파악하지 않고 autovacuum을 끄면 안됨 • Autovacuum 데몬을 사용하지 않는다면, 해당 DB 서버에서 사용하고 있는 모든 DB에 대해서 Vacuum 작업을 해야 함 • Autovacuum 데몬은 테이블 자료 추가/변경/삭제 된 경우, 무조건 작업의 고려 대상으로 판단 (임시 테이블은 대상에서 제외) Vacuum 작업은 내가 직접 작업량이 적은 밤 시간에 주 기적으로 해야지! 갑자기 변경이 많은 작업 발생 최악의 경우, Vacuum Full DBA
  • 16. © Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved. 2. Autovacuum autovacuum_naptime autovacuum 데몬에 대한 “activity rounds”간격 즉, autovacuum 데몬이 한번 작업 하고, 쉬는 시간 (기본 값 1분 – 초(秒)로 설정) autovacuum_vacuum_threshold / autovacuum_analyze_threshold 한 테이블 내에서 업데이트/삭제된 튜플이 설정 값만큼 된다면 VACUUM/ANAYLZE 작 업하는 수행, 작업 시작할 최소 변경 수 (기본 값 50) autovacuum_freeze_max_age 한 테이블 내에서 마지막 vacuum 작업으로 pg_class.relfrozenxid 값이 지정된 뒤로, 이 설정 값보다 더 커지면 vacuum 작업 수행 autovacuum_vacuum_cost_delay autovacuum 데몬의 초과 비용 사용시, 멈추는 최대 시간 autovacuum_vacuum_cost_limit autovacuum 데몬이 사용할 수 있는 최대 비용 autovacuum_vacuum_scale_factor 한 테이블 내에서 autovacuum_vacuum_threshold 값이 초과되어 vacuum 작업을 시 작하려고 할 때, 추가적으로 테이블 크기의 변화량 (기본값은 0.2 = 테이블 크기의 20%)
  • 17. © Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved. Autovacuum이 작업하는 기준 2. Autovacuum 1. 테이블 나이가 autovacuum_freeze_max_age 설정으로 지정한 트랜잭션 수보다 많다면, 그 테이블은 무조건 Vacuum 작업 * 테이블의 나이: relfrozenxid 칼럼 값을 age () 함수로 조사한 값 2. 테이블의 자료가 변경되어, Vacuum 임계치를 초과했다면, Vacuum 작업 * Vacuum 임계치 = Vacuum 초기 임계치 + Vacuum 배율값 * 튜플수 • Vacuum 초기 임계치: autovacuum_vacuum_threshold • Vacuum 배율값: autovacuum_vacuum_scale_factor • 튜플수: pg_class.reltuples
  • 18. © Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved. 02. [MySQL] Page와 Undo page deep internal 분석 발표자: 연구컨텐츠팀 이근오
  • 19. © Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved. Page와 Undo page deep internal 분석 Page의 기본구조 1개의 Page는 16 KB 구성 Page의 Header/Trailer 상세 1개의 Page는 16 KB 구성 Page 덤프 테이블(T1)의 파일 덤프
  • 20. © Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved. Page와 Undo page deep internal 분석 Clustered indexes Page 상세 (1/2) Page 덤프 테이블(T1)의 파일 덤프 03 06 02 0e 00 00 00 10 00 30 50 50 31 30 31 30 20 … 00 00 00 af 06 22 bc 00 00 61 0c 01 10 41 20 41 20 … trx_id “af0622” hex값을 변환하면 11470370 The fields of the roll pointer structure are: 1-bit “is insert” flag, 7-bit rollback segment ID, 4-byte page number and 2-byte page offset of the undo log location.  create table exem_i.t1 ( c1 char(14), c2 char(2) , c3 char(6), c4 char(3) , primary key(c1) ) engine=innodb ;  create index t1_ix1 on exem_i.t1( c3,c4 ) ;  Insert into t1 values (‘PP1010’,’A’,’A’,’A’) ;  Insert into t1 values (‘PP1020’,’A’,’A’,’A’) ;  Insert into t1 values (‘PP1030’,’A’,’A’,’A’) ;
  • 21. © Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved. Page와 Undo page deep internal 분석 Clustered indexes Page 상세 (2/2) Page 덤프 테이블(T1)의 파일 덤프 PK인덱스로 구성된 테이블의 Page 상세구조  Infimum 포인트에서 시작해서 Next Offset 값으로 연결된 구조
  • 22. © Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved. Page와 Undo page deep internal 분석 Secondary indexes Page 상세 Page 덤프 테이블(T1) 의 파일에서 인덱스페이지 덤프 Non-PK 인덱스의 Page 상세구조  Clustered indexes 페이지와 비슷한 구조로 Infimum 포인트에서 시작해서 Next Offset 값으로 연결된 구조  오라클의 rowid 값 역할을 PK 컬럼이 대신한다.
  • 23. © Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved. 03. [MySQL] Hint 사용법 발표자: 연구컨텐츠팀 이대덕
  • 24. © Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved. Hint 사용법 분류 힌트명 설명 용법 • 5.7.7부터 출시된 힌트들 • 이전 버전에서는optimizer_switch 변수로 설정을 했지만 쿼리단위로 설정을 할 수는 없었음 BKA Batched Key Access join수행여부 /*+ BKA(@qb|table) */ NO_BKA /*+ NO_BKA(@qb|table) */ BNL Block Nested-Loop join수행여부 /*+ BNL(@qb|table) */ NO_BNL /*+ NO_BNL(@qb|table) */ MRR Multi-Range Read 오퍼레이션 수행여부 /*+ MRR(table|index) */ NO_MRR /*+ NO_MRR(table|index) */ MAX_EXECUTION_TIME SELECT 수행시간에 제한을 둠 (N milliseconds) /*+ MAX_EXECUTION_TIME(n) */ NO_ICP Index Condition Pushdown오퍼레이션이 수행안되게 함 /*+ NO_ICP(table|index) */ NO_RANGE_OPTIMIZATION Range 스캔을 사용하지 못하게 함 해당 힌트 사용시 인덱스 Merge나 Loose 인덱스 스캔도 불가능 /*+ NO_RANGE_OPTIMIZATION(ta ble|index) */ QB_NAME 쿼리블록에 이름을 할당함 /*+ QB_NAME(qbname) */ SEMIJOIN 세미조인전략 지정 및 사용여부 (DUPSWEEDOUT, FIRSTMA TCH, LOOSESCAN, MATERIALIZATION) /*+ SEMIJOIN(@qb strategy) */ NO_SEMIJOIN /*+ NO_SEMIJOIN(@qb strategy) */ SUBQUERY 서브쿼리전략 지정(INTOEXISTS, MATERIALIZATION) /*+ SUBQUERY(@qb strategy) */
  • 25. © Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved. Hint 사용법 분류 힌트명 설명 용법 • 예약어중 힌트의 용도로 사 용되는 것들 (http://dev.mysql.com/d oc/refman/5.7/en/keywo rds.html) USE INDEX 사용할 인덱스를 선택 USE {INDEX|KEY} [FOR {JOIN|ORDER BY|GR OUP BY}] ([index_list]) INGONRE INDEX 명시된 인덱스를 사용하지 않음 IGNORE {INDEX|KEY} [FOR {JOIN|ORDER BY| GROUP BY}] (index_list) FORCE INDEX 사용할 인덱스를 강제로 선택 FORCE {INDEX|KEY} [FOR {JOIN|ORDER BY| GROUP BY}] (index_list) STRAIGHT_JOIN 조인의 순서를 FROM절의 순서로 고정 SELECT STRAIGHT_JOIN ... FROM SQL_SMALL_RESULT 옵티마이저가 결과가 '작을' 것이라고 알려줌 SELECT SQL_SMALL_RESULT ... FROM SQL_BIG_RESULT 옵티마이저가 결과가 '클' 것이라고 알려줌 SELECT SQL_BIG_RESULT ... FROM SQL_BUFFER_RESULT 결과를 임시테이블에 두며, 서브쿼리에서 사용불가 SELECT SQL_BUFFER_RESULT ... FROM SQL_CACHE 쿼리를 쿼리캐시(query_cache_type=2)에 캐시함 SELECT SQL_CACHE ... FROM SQL_NO_CACHE 쿼리를 쿼리캐시에 캐시하지 않음 SELECT SQL_NO_CACHE ... FROM SQL_CALC_FOUND_ROWS LIMIT이 붙든 안붙든 모든 로우수를 계산시킴, FOUND_ROWS()함수로 조회가능. SELECT SQL_CALC_FOUND_ROWS ... FROM HIGH_PRIORITY 테이블락을 지원하는(ex. Myisam)스토리지 엔진에서 사용, 해당 힌트가 명시된 문장을 락 대기 큐에서의 우선순위를 정함, SELECT HIFH_PRIORITY ... FROM LOW_PRIORITY SELECT LOW_PRIORITY ... FROM DELAYED INSERT, REPLACE문장을 버퍼에 담아두고 한번에 처리 INSERT DELAYED INTO ...
  • 26. © Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved. Hint 사용법 ignore index(key|index) 사용 예제 mysql> explain select * from employees.employees where emp_no<30000 +----+-------------+-----------+------------+-------+---------------+---------+---------+------+-------+----------+-------------+ | id | select_type | table | partitions | type | possible_keys | key | key_len | ref | rows | filtered | Extra | +----+-------------+-----------+------------+-------+---------------+---------+---------+------+-------+----------+-------------+ | 1 | SIMPLE | employees | NULL | range | PRIMARY | PRIMARY | 4 | NULL | 39392 | 100.00 | Using where | +----+-------------+-----------+------------+-------+---------------+---------+---------+------+-------+----------+-------------+ mysql> explain select * from employees.employees ignore index(primary) where emp_no<30000; +----+-------------+-----------+------------+------+---------------+------+---------+------+--------+----------+-------------+ | id | select_type | table | partitions | type | possible_keys | key | key_len | ref | rows | filtered | Extra | +----+-------------+-----------+------------+------+---------------+------+---------+------+--------+----------+-------------+ | 1 | SIMPLE | employees | NULL | ALL | NULL | NULL | NULL | NULL| 299113 | 33.33 | Using where | +----+-------------+-----------+------------+------+---------------+------+---------+------+--------+----------+-------------+
  • 27. © Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved. Hint 사용법 straight join 사용 예제 mysql> explain select * from employees,departments limit 1; +----+-------------+-------------+------------+-------+---------------+-----------+---------+------+--------+----------+---------------------------------------+ | id | select_type | table | partitions | type | possible_keys | key | key_len | ref | rows | filtered | Extra | +----+-------------+-------------+------------+-------+---------------+-----------+---------+------+--------+----------+---------------------------------------+ | 1 | SIMPLE | departments | NULL | index | NULL | dept_name | 122 | NULL | 9 | 100.00 | Using index | | 1 | SIMPLE | employees | NULL | ALL | NULL | NULL | NULL | NULL | 299113 | 100.00 | Using join buffer (Block Nested Loop) | +----+-------------+-------------+------------+-------+---------------+-----------+---------+------+--------+----------+---------------------------------------+ 2 rows in set, 1 warning (0.00 sec) mysql> explain select STRAIGHT_JOIN * from employees,departments limit 1; +----+-------------+-------------+------------+-------+---------------+-----------+---------+------+--------+----------+----------------------------------------------------+ | id | select_type | table | partitions | type | possible_keys | key | key_len | ref | rows | filtered | Extra | +----+-------------+-------------+------------+-------+---------------+-----------+---------+------+--------+----------+----------------------------------------------------+ | 1 | SIMPLE | employees | NULL | ALL | NULL | NULL | NULL | NULL | 299113 | 100.00 | NULL | | 1 | SIMPLE | departments | NULL | index | NULL | dept_name | 122 | NULL | 9 | 100.00 | Using index; Using join buffer (Block Nested Loop) | +----+-------------+-------------+------------+-------+---------------+-----------+---------+------+--------+----------+----------------------------------------------------+ 2 rows in set, 1 warning (.00 sec)
  • 28. © Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved. Hint 사용법 SQL_CACHE 사용 예제 mysql> select * from employees.employees limit 100000; mysql> show status like 'Qcache_inserts'; +----------------+-------+ | Variable_name | Value | +----------------+-------+ | Qcache_inserts | 3 | +----------------+-------+ mysql> select sql_cache * from employees.employees limit 100000; mysql> show status like 'Qcache_inserts'; +----------------+-------+ | Variable_name | Value | +----------------+-------+ | Qcache_inserts | 4 | +----------------+-------+
  • 29. © Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved. Hint 사용법 NO_BNL 사용 예제 mysql> explain select * from departments join employees limit 1; +----+-------------+-----------+------------+-------+---------------+-----------+---------+------+--------+----------+---------------------------------------+ | id | select_type | table | partitions | type | possible_keys | key | key_len | ref | rows | filtered | Extra | +----+-------------+-----------+------------+-------+---------------+-----------+---------+------+--------+----------+---------------------------------------+ | 1 | SIMPLE | straight | NULL | index | NULL | dept_name | 122 | NULL | 9 | 100.00 | Using index | | 1 | SIMPLE | employees | NULL | ALL | NULL | NULL | NULL | NULL | 299113 | 100.00 | Using join buffer (Block Nested Loop) | +----+-------------+-----------+------------+-------+---------------+-----------+---------+------+--------+----------+---------------------------------------+ mysql> explain select /*+ no_bnl(employees) */ * from departments straight join employees limit 1; +----+-------------+-----------+------------+-------+---------------+-----------+---------+------+--------+----------+-------------+ | id | select_type | table | partitions | type | possible_keys | key | key_len | ref | rows | filtered | Extra | +----+-------------+-----------+------------+-------+---------------+-----------+---------+------+--------+----------+-------------+ | 1 | SIMPLE | straight | NULL | index | NULL | dept_name | 122 | NULL | 9 | 100.00 | Using index | | 1 | SIMPLE | employees | NULL | ALL | NULL | NULL | NULL | NULL | 299113 | 100.00 | NULL | +----+-------------+-----------+------------+-------+---------------+-----------+---------+------+--------+----------+-------------+
  • 30. Research & Contents Blog Video E-mail NAVER http://cafe.naver.com/playexem ITPUB http://blog.itpub.net/31135309/ Wordpress https://playexem.wordpress.com/ Slideshare http://www.slideshare.net/playexem Youtube https://www.youtube.com/channel/UC5wKR _-A0eL_Pn_EMzoauJg Tudou http://www.tudou.com/home/maxgauge/ 교육 문의: 연구컨텐츠팀 김숙진 edu@ex-em.com © Copyrights 2001~2016, EXEM CO.,LTD. All Rights Reserved.