SlideShare a Scribd company logo
1 of 27
Download to read offline
© Copyrights 2001~2017 EXEM CO.,LTD. All Rights Reserved.
InnoDB의 Purge 메커니즘
엑셈 | 이근오 부장
© Copyrights 2001~2017 EXEM CO.,LTD. All Rights Reserved.
03. Purge Garbage Space
01. Purge 정의 및 필요성
02. Purge Update Undo
Table of Agenda
© Copyrights 2001~2017 EXEM CO.,LTD. All Rights Reserved.
1) Purge 정의 및 필요성
MySQL Deep Internal
© Copyrights 2001~2017 EXEM CO.,LTD. All Rights Reserved.
MySQL Deep Internal1) Purge 정의 및 필요성
• History list가 길어져 before-image가 필요한 쿼리의 성능 저하를 방지하기 위해서
• 변경 및 삭제된 자료들이 차지하고 있는 디스크 공간을 확보하기 위해
2. Purge의 필요성
1. Purge의 정의
데이터의 변경이 발생하였을 때, 다른 트랜잭션의 읽기 일관성(MVCC)을 위해 변경 전의 데이터를 롤백
세그먼트에 기록해둔다. 이 데이터가 더 이상 필요하지 않게 되면 해당 세그먼트를 재사용하기 위해 청소하는
것을 의미한다.
© Copyrights 2001~2017 EXEM CO.,LTD. All Rights Reserved.
2) Purge Update Undo
MySQL Deep Internal
© Copyrights 2001~2017 EXEM CO.,LTD. All Rights Reserved.
MySQL Deep Internal2) Purge Update Undo
source: http://blog.jcole.us/2013/01/04/page-management-in-innodb-space-files/
FIL HEADER (38)
List node for INODE Page list (12)
INODE 0 (192)
INODE 1 (192)
INODE 2 (192)
…
INODE 83 (192)
INODE 84 (192)
(Empty Space, 6 Bytes)
FIL Trailer (8)
FSEG ID (8)
Number of used pages in
“NOT_FULL”list (4)
List base node for “FREE” list (16)
List base node for “NOT_FULL” list (16)
List base node for “FULL” list (16)
Magic Number = 97937874 (4)
Fragment Array Entry 0 (4)
…
Fragment Array Entry 31 (4)
INODE Overview INODE Entry
MySQL Deep Internal
© Copyrights 2001~2017 EXEM CO.,LTD. All Rights Reserved.
MySQL Deep Internal2) Purge Update Undo
source: http://mysqldba.tistory.com/126
테이블스페이스 내의 세그먼트 정보를 얻기 위해 사용
Element Description
File Segment ID
- 파일 세그먼트의 ID값
- 값이 0 이면, entry를 사용하지 않았다는 의미
Number of used pages in
the NOT_NULL list
- File Space Header의 FREE_FRAG 리스트와 비슷함
( *FREE_FRAG : fragments에 사용된다고 할당된 extent에서 아직 사용하지 않은 페이지들을 가진 extent)
- NOT_FULL 리스트에서 사용하는 page number를 기록
FREE - 파일 세그먼트에 할당되었지만, 한번도 사용하지 않은 extent를 가진 리스트
NOT_FULL
- 파일 세그먼트에 할당된 것 중 적어도 하나는 사용한 extent를 가진 리스트
- 마지막에 남은 free page가 사용되면, 이 extent는 FULL 리스트로 넘어감
FULL
- File segment에 할당된 페이지를 전부 사용하고 있는 extent를 가진 리스트
- 페이지 하나라도 free 상태로 변경된다면, 이 extent는 NOT_FULL 리스트로 넘어감
Magic Number - Marker로서 97937874라는 값이 저장되는데, 이것은 file segment INODE의 초기화를 의미
Fragment Array
- FREE_FRAG 또는 FULL_FRAG에 있는 extent로 부터 개별적으로 할당된 페이지들의 array
( *FULL_FRAG : 남아있는 free page가 없는 경우에 위치)
• INODE Entry
MySQL Deep Internal
© Copyrights 2001~2017 EXEM CO.,LTD. All Rights Reserved.
MySQL Deep Internal
show engine innodb status;
Trx id counter : 21430
History list length : 0
undo001 space 1
Page
0
Page
1
Page
2
Page
3
Page
4
Page
5
…
Page
8
2) Purge Update Undo
Page (8f,3)
Rec0000, A, 199
Rec0010, A, 199
Rec0020, A, 199
Rec0030, A, 199
Rec0040, A, 199
T1.ibd space 8f
Page
0
Page
1
Page
2
Page
3
…
Page
64
User Tablespace
Undo Tablespace
HISTORY_SIZE = 0
First Page No/Offset = FF/0
Last Page No/Offset = FF/0
slot 0 00 00 00 04
slot 1
…
slot 1023
FSEG_ID PAGE_NO
00 00 00 01 00 00 00 03
00 00 00 04 00 00 00 04
(1,3) Rollback Segment(1,2) INODE
MySQL Deep Internal
© Copyrights 2001~2017 EXEM CO.,LTD. All Rights Reserved.
MySQL Deep Internal
HISTORY_SIZE = 0
First Page No/Offset = FF/0
Last Page No/Offset = FF/0
slot 0 00 00 00 04
slot 1 00 00 00 05
…
slot 1023
FSEG_ID PAGE_NO
00 00 00 01 00 00 00 03
00 00 00 04 00 00 00 04
00 00 1a d2 00 00 00 05
(1,3) Rollback Segment(1,2) INODE
undo001 space 1
Page
0
Page
1
Page
2
Page
3
Page
4
Page
5
…
Page
8
Page (8f,3)
Rec0000, A, 200
Rec0010, A, 200
Rec0020, A, 200
Rec0030, A, 200
Rec0040, A, 200
T1.ibd space 8f
Page
0
Page
1
Page
2
Page
3
…
Page
64
User Tablespace
Undo Tablespace
Page (1,5)
Trx_id : 0x53b6
Trx_no : 0x00
Rec0000, A, 199
2) Purge Update Undo
show engine innodb status;
Trx id counter : 21430
History list length : 0
Begin;
Update t1 set c3=c3+1;
MySQL Deep Internal
© Copyrights 2001~2017 EXEM CO.,LTD. All Rights Reserved.
MySQL Deep Internal
HISTORY_SIZE = 1
First Page No/Offset = 05/78
Last Page No/Offset = 05/78
slot 0 00 00 00 04
slot 1
…
slot 1023
FSEG_ID PAGE_NO
00 00 00 01 00 00 00 03
00 00 00 04 00 00 00 04
00 00 1a d2 00 00 00 05
undo001 space 1
Page
0
Page
1
Page
2
Page
3
Page
4
Page
5
…
Page
8
2) Purge Update Undo
Page (8f,3)
Rec0000, A, 200
Rec0010, A, 200
Rec0020, A, 200
Rec0030, A, 200
Rec0040, A, 200
T1.ibd space 8f
Page
0
Page
1
Page
2
Page
3
…
Page
64
User Tablespace
Undo Tablespace
Page (1,5)
Trx_id : 0x53b6
Trx_no : 0x53b7
Rec0000, A, 199
(1,3) Rollback Segment(1,2) INODE
show engine innodb status;
Trx id counter : 21432
History list length : 1
Commit;
MySQL Deep Internal
© Copyrights 2001~2017 EXEM CO.,LTD. All Rights Reserved.
MySQL Deep Internal
HISTORY_SIZE = 1
First Page No/Offset = 05/78
Last Page No/Offset = 05/78
slot 0 00 00 00 04
slot 1 00 00 00 06
…
slot 1023
FSEG_ID PAGE_NO
00 00 00 01 00 00 00 03
00 00 00 04 00 00 00 04
00 00 1a d2 00 00 00 05
00 00 1a d3 00 00 00 06
undo001 space 1
Page
0
Page
1
Page
2
Page
3
Page
4
Page
5
Page
6
…
2) Purge Update Undo
Page (8f,3)
Rec0000, A, 201
Rec0010, A, 201
Rec0020, A, 201
Rec0030, A, 201
Rec0040, A, 201
T1.ibd space 8f
Page
0
Page
1
Page
2
Page
3
…
Page
64
User Tablespace
Undo Tablespace
Page (1,6)
Trx_id : 0x53b8
Trx_no : 0x00
Rec0000, A, 200
(1,3) Rollback Segment(1,2) INODE
show engine innodb status;
Trx id counter : 21432
History list length : 1
Begin;
Update t1 set c3=c3+1;
MySQL Deep Internal
© Copyrights 2001~2017 EXEM CO.,LTD. All Rights Reserved.
MySQL Deep Internal
HISTORY_SIZE = 2
First Page No/Offset = 06/78
Last Page No/Offset = 05/78
slot 0 00 00 00 04
slot 1
…
slot 1023
FSEG_ID PAGE_NO
00 00 00 01 00 00 00 03
00 00 00 04 00 00 00 04
00 00 1a d2 00 00 00 05
00 00 1a d3 00 00 00 06
undo001 space 1
Page
0
Page
1
Page
2
Page
3
Page
4
Page
5
Page
6
…
2) Purge Update Undo
Page (8f,3)
Rec0000, A, 201
Rec0010, A, 201
Rec0020, A, 201
Rec0030, A, 201
Rec0040, A, 201
T1.ibd space 8f
Page
0
Page
1
Page
2
Page
3
…
Page
64
User Tablespace
Undo Tablespace
Page (1,6)
Trx_id : 0x53b8
Trx_no : 0x53b9
Rec0000, A, 200
(1,3) Rollback Segment(1,2) INODE
show engine innodb status;
Trx id counter : 21434
History list length : 2
Commit;
MySQL Deep Internal
© Copyrights 2001~2017 EXEM CO.,LTD. All Rights Reserved.
MySQL Deep Internal
HISTORY_SIZE = 2
First Page No/Offset = 06/78
Last Page No/Offset = 05/78
slot 0 00 00 00 04
slot 1 00 00 00 07
…
slot 1023
FSEG_ID PAGE_NO
00 00 00 01 00 00 00 03
00 00 00 04 00 00 00 04
00 00 1a d2 00 00 00 05
00 00 1a d3 00 00 00 06
00 00 1a d4 00 00 00 07
undo001 space 1
Page
0
Page
1
Page
2
Page
3
Page
4
Page
5
…
Page
7
2) Purge Update Undo
Page (8f,3)
Rec0000, A, 202
Rec0010, A, 202
Rec0020, A, 202
Rec0030, A, 202
Rec0040, A, 202
T1.ibd space 8f
Page
0
Page
1
Page
2
Page
3
…
Page
64
User Tablespace
Undo Tablespace
Page (1,7)
Trx_id : 0x53ba
Trx_no : 0x00
Rec0000, A, 201
(1,3) Rollback Segment(1,2) INODE
show engine innodb status;
Trx id counter : 21434
History list length : 2
Begin;
Update t1 set c3=c3+1;
MySQL Deep Internal
© Copyrights 2001~2017 EXEM CO.,LTD. All Rights Reserved.
MySQL Deep Internal
HISTORY_SIZE = 3
First Page No/Offset = 07/78
Last Page No/Offset = 05/78
slot 0 00 00 00 04
slot 1
…
slot 1023
FSEG_ID PAGE_NO
00 00 00 01 00 00 00 03
00 00 00 04 00 00 00 04
00 00 1a d2 00 00 00 05
00 00 1a d3 00 00 00 06
00 00 1a d4 00 00 00 07
undo001 space 1
Page
0
Page
1
Page
2
Page
3
Page
4
Page
5
…
Page
7
2) Purge Update Undo
Page (8f,3)
Rec0000, A, 202
Rec0010, A, 202
Rec0020, A, 202
Rec0030, A, 202
Rec0040, A, 202
T1.ibd space 8f
Page
0
Page
1
Page
2
Page
3
…
Page
64
User Tablespace
Undo Tablespace
Page (1,7)
Trx_id : 0x53ba
Trx_no : 0x53bb
Rec0000, A, 201
(1,3) Rollback Segment(1,2) INODE
show engine innodb status;
Trx id counter : 21436
History list length : 3
Commit;
MySQL Deep Internal
© Copyrights 2001~2017 EXEM CO.,LTD. All Rights Reserved.
MySQL Deep Internal
HISTORY_SIZE = 2d
First Page No/Offset = 31/78
Last Page No/Offset = 05/78
slot 0 00 00 00 04
slot 1 00 00 00 32
…
slot 1023
FSEG_ID PAGE_NO
00 00 00 01 00 00 00 03
00 00 00 04 00 00 00 04
00 00 1a d2 00 00 00 05
… …
00 00 1a ff 00 00 00 32
undo001 space 1
Page
0
Page
1
Page
2
Page
3
Page
4
Page
5
…
Page
32
2) Purge Update Undo
Page (8f,3)
Rec0000, A, 245
Rec0010, A, 245
Rec0020, A, 245
Rec0030, A, 245
Rec0040, A, 245
T1.ibd space 8f
Page
0
Page
1
Page
2
Page
3
…
Page
64
User Tablespace
Undo Tablespace
Page (1,32)
Trx_id : 0x5410
Trx_no : 0x00
Rec0000, A, 244
(1,3) Rollback Segment(1,2) INODE
show engine innodb status;
Trx id counter : 21520
History list length : 45
Begin;
Update t1 set c3=c3+1;
MySQL Deep Internal
© Copyrights 2001~2017 EXEM CO.,LTD. All Rights Reserved.
MySQL Deep Internal
HISTORY_SIZE = 0
First Page No/Offset = FF/0
Last Page No/Offset = FF/0
slot 0 00 00 00 04
slot 1
…
slot 1023
FSEG_ID PAGE_NO
00 00 00 01 00 00 00 03
00 00 00 04 00 00 00 04
undo001 space 1
Page
0
Page
1
Page
2
Page
3
Page
4
Page
5
…
Page
32
2) Purge Update Undo
Page (8f,3)
Rec0000, A, 245
Rec0010, A, 245
Rec0020, A, 245
Rec0030, A, 245
Rec0040, A, 245
T1.ibd space 8f
Page
0
Page
1
Page
2
Page
3
…
Page
64
User Tablespace
Undo Tablespace
Page (1,32)
Trx_id : 0x5410
Trx_no : 0x5411
Rec0000, A, 244
(1,3) Rollback Segment(1,2) INODE
• Update Undo가 Purge 됨
• History list length : 2d  0
• First/Last Page 정보 초기화
• INODE : 05 ~ 32 페이지 정보 초기화
show engine innodb status;
Trx id counter : 21522
History list length : 0
Commit;
© Copyrights 2001~2017 EXEM CO.,LTD. All Rights Reserved.
3) Purge Garbage Space
MySQL Deep Internal
© Copyrights 2001~2017 EXEM CO.,LTD. All Rights Reserved.
MySQL Deep Internal
정의 및 목적
• 레코드를 삭제할 경우, 바로 삭제되지 않고 해당 레코드 헤더에
위치한 ‘Info_flags’ (4 bit)의 bit를 2로 설정
• Purge Thread가 Commit이 적용된 페이지 헤더에 위치한
Garbage Offset을 설정함으로써 해당 공간을 재사용
( * Garbage Offset = start of page free record list pointer)
• 2건 이상 Delete, Commit될 경우, Garbage Offset은 가장
마지막에 삭제된 레코드의 포인터를 가지며, 가장 마지막에
삭제된 행은 그 이전에 삭제된 행의 포인터를 가짐으로써 삭제된
공간의 재사용은 마지막부터 시작
3) Purge Garbage Space
T1.ibd space (Space ID : e0)
Page
0
Page
1
…
Page
3
…
Page
64
REC 001 x
시작주소 사이즈
I
S
MySQL Deep Internal
© Copyrights 2001~2017 EXEM CO.,LTD. All Rights Reserved.
MySQL Deep Internal
1. Insert into exem_i.t1 values
('Rec0000','A','1 ') ... ('Rec0040','A','1');
FIL Header
• PAGE_N_RECS : 5
• Last Insert : Rec0040
• Checksum : 0x9732acfa
• LSN : 0x0f7f2cbe
3) Purge Garbage Space
000000 97 32 ac fa 00 00 00 03 ff ff ff ff ff ff ff ff > . 2 . . . . . . . . . . . . . . <
000010 00 00 00 00 0f 7f 2c be 45 bf 00 00 00 00 00 00 > . . . . . . , . E . . . . . . . <
000020 00 00 00 00 00 e0 00 02 0a 78 80 07 00 00 00 00 > . . . . . . . . . x . . . . . . <
000030 08 82 00 02 00 04 00 05 00 00 00 00 00 00 00 00 > . . . . . . . . . . . . . . . . <
000040 00 00 00 00 00 00 00 00 00 da 00 00 00 e0 00 00 > . . . . . . . . . . . . . . . . <
000050 00 02 00 f2 00 00 00 e0 00 00 00 02 00 32 01 00 > . . . . . . . . . . . . . 2 . . <
000060 02 00 1f 69 6e 66 69 6d 75 6d 00 06 00 0b 00 00 >...infimum......<
000070 73 75 70 72 65 6d 75 6d d0 81 0b 0e 00 00 00 10 >supremum........<
000080 02 00 52 65 63 30 30 30 30 20 20 20 20 20 20 20 >..Rec0000 <
000090 00 00 00 01 86 18 a1 00 00 00 04 01 10 41 20 20 >.............A <
0000a0 20 20 20 20 20 20 20 20 31 20 20 20 20 20 20 20 > 1 <
0000b0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 > <
*
000270 20 20 20 20 20 20 20 20 d0 81 0b 0e 00 00 00 18 > ........<
000280 02 00 52 65 63 30 30 31 30 20 20 20 20 20 20 20 >..Rec0010 <
000290 00 00 00 01 86 18 a1 00 00 00 04 01 27 41 20 20 >............ 'A <
0002a0 20 20 20 20 20 20 20 20 31 20 20 20 20 20 20 20 > 1 <
0002b0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 > <
*
000470 20 20 20 20 20 20 20 20 d0 81 0b 0e 00 00 00 20 > ....... <
000480 02 00 52 65 63 30 30 32 30 20 20 20 20 20 20 20 >..Rec0020 <
000490 00 00 00 01 86 18 a1 00 00 00 04 01 3e 41 20 20 >............>A <
0004a0 20 20 20 20 20 20 20 20 31 20 20 20 20 20 20 20 > 1 <
0004b0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 > <
*
000670 20 20 20 20 20 20 20 20 d0 81 0b 0e 00 00 00 28 > .......(<
000680 02 00 52 65 63 30 30 33 30 20 20 20 20 20 20 20 >..Rec0030 <
000690 00 00 00 01 86 18 a1 00 00 00 04 01 55 41 20 20 >............UA <
0006a0 20 20 20 20 20 20 20 20 31 20 20 20 20 20 20 20 > 1 <
0006b0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 > <
*
000870 20 20 20 20 20 20 20 20 d0 81 0b 0e 00 00 00 30 > .......0<
000880 f7 ee 52 65 63 30 30 34 30 20 20 20 20 20 20 20 >..Rec0040 <
000890 00 00 00 01 86 18 a1 00 00 00 04 01 6c 41 20 20 >............ lA <
Page Header
Rec0000
• Next Record : Rec0010
Rec0040
• Next Record : supremum
MySQL Deep Internal
© Copyrights 2001~2017 EXEM CO.,LTD. All Rights Reserved.
MySQL Deep Internal
000000 97 32 ac fa 00 00 00 03 ff ff ff ff ff ff ff ff > . 2 . . . . . . . . . . . . . . <
000010 00 00 00 00 0f 7f 2c be 45 bf 00 00 00 00 00 00 > . . . . . . , . E . . . . . . . <
000020 00 00 00 00 00 e0 00 02 0a 78 80 07 00 00 00 00 > . . . . . . . . . x . . . . . . <
000030 08 82 00 02 00 04 00 05 00 00 00 00 00 00 00 00 > . . . . . . . . . . . . . . . . <
000040 00 00 00 00 00 00 00 00 00 da 00 00 00 e0 00 00 > . . . . . . . . . . . . . . . . <
000050 00 02 00 f2 00 00 00 e0 00 00 00 02 00 32 01 00 > . . . . . . . . . . . . . 2 . . <
000060 02 00 1f 69 6e 66 69 6d 75 6d 00 06 00 0b 00 00 >...infimum......<
000070 73 75 70 72 65 6d 75 6d d0 81 0b 0e 00 00 00 10 >supremum........<
000080 02 00 52 65 63 30 30 30 30 20 20 20 20 20 20 20 >..Rec0000 <
000090 00 00 00 01 86 18 a1 00 00 00 04 01 10 41 20 20 >....... ... ... A <
0000a0 20 20 20 20 20 20 20 20 31 20 20 20 20 20 20 20 > 1 <
0000b0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 > <
*
000270 20 20 20 20 20 20 20 20 d0 81 0b 0e 00 20 00 18 > ..... ..<
000280 02 00 52 65 63 30 30 31 30 20 20 20 20 20 20 20 >..Rec0010 <
000290 00 00 00 01 86 21 22 00 00 00 08 1b 99 41 20 20 >.....!"......A <
0002a0 20 20 20 20 20 20 20 20 31 20 20 20 20 20 20 20 > 1 <
0002b0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 > <
3) Purge Garbage Space
Rec0010
• Info Flags 0x20UL (Deleted Bit)
• Transaction ID(6 Bytes)
• Roll Pointer(7 Bytes)
2. Begin;
Delete from exem_i.t1 where c1 = 'Rec0010' ;
MySQL Deep Internal
© Copyrights 2001~2017 EXEM CO.,LTD. All Rights Reserved.
MySQL Deep Internal3) Purge Garbage Space
3. Commit ;
000000 9a a7 a5 de 00 00 00 03 ff ff ff ff ff ff ff ff > . . . . . . . . . . . . . . . . <
000010 00 00 00 00 0f 7f 37 42 45 bf 00 00 00 00 00 00 > . . . . . . 7 B E . . . . . . . <
000020 00 00 00 00 00 e0 00 02 0a 78 80 07 00 00 00 00 > . . . . . . . . . x . . . . . . <
000030 08 82 00 02 00 04 00 05 00 00 00 00 00 00 00 00 > . . . . . . . . . . . . . . . . <
000040 00 00 00 00 00 00 00 00 00 da 00 00 00 e0 00 00 > . . . . . . . . . . . . . . . . <
000050 00 02 00 f2 00 00 00 e0 00 00 00 02 00 32 01 00 > . . . . . . . . . . . . . 2 . . <
000060 02 00 1f 69 6e 66 69 6d 75 6d 00 06 00 0b 00 00 > . . . i n f i m u m . . . . . . <
000070 73 75 70 72 65 6d 75 6d d0 81 0b 0e 00 00 00 10 >supremum........<
000080 02 00 52 65 63 30 30 30 30 20 20 20 20 20 20 20 >..Rec0000 <
000090 00 00 00 01 86 18 a1 00 00 00 04 01 10 41 20 20 > . . . . . . . . . . . . . A <
0000a0 20 20 20 20 20 20 20 20 31 20 20 20 20 20 20 20 > 1 <
0000b0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 > <
*
000270 20 20 20 20 20 20 20 20 d0 81 0b 0e 00 20 00 18 > . . . . . . . <
000280 02 00 52 65 63 30 30 31 30 20 20 20 20 20 20 20 >..Rec0010 <
000290 00 00 00 01 86 21 22 00 00 00 08 1b 99 41 20 20 > . . . . . ! " . . . . . . A <
0002a0 20 20 20 20 20 20 20 20 31 20 20 20 20 20 20 20 > 1 <
0002b0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 > <
*
000a70 20 20 20 20 20 20 20 20 00 00 00 00 00 00 00 00 > ........<
000a80 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >................<
*
003ff0 00 00 00 00 00 70 00 63 9a a7 a5 de 0f 7f 37 42 >.....p.c......7B<
FIL Header
• Checksum : 0x9aa7a5de
• LSN : 0x7f3742
FIL Trailer
• Checksum : 0x9aa7a5de
• LSN : 0x7f3742
MySQL Deep Internal
© Copyrights 2001~2017 EXEM CO.,LTD. All Rights Reserved.
MySQL Deep Internal
000000 9a a7 a5 de 00 00 00 03 ff ff ff ff ff ff ff ff > . . . . . . . . . . . . . . . . <
000010 00 00 00 00 0f 7f 37 42 45 bf 00 00 00 00 00 00 > . . . . . . 7 B E . . . . . . . <
000020 00 00 00 00 00 e0 00 02 0a 78 80 07 02 82 02 00 > . . . . . . . . . x . . . . . . <
000030 00 00 00 02 00 04 00 04 00 00 00 00 00 00 00 00 > . . . . . . . . . . . . . . . . <
000040 00 00 00 00 00 00 00 00 00 da 00 00 00 e0 00 00 > . . . . . . . . . . . . . . . . <
000050 00 02 00 f2 00 00 00 e0 00 00 00 02 00 32 01 00 > . . . . . . . . . . . . . 2 . . <
000060 02 00 1f 69 6e 66 69 6d 75 6d 00 05 00 0b 00 00 >...infimum......<
000070 73 75 70 72 65 6d 75 6d d0 81 0b 0e 00 00 00 10 >supremum........<
000080 04 00 52 65 63 30 30 30 30 20 20 20 20 20 20 20 >..Rec0000 <
000090 00 00 00 01 86 18 a1 00 00 00 04 01 10 41 20 20 > . . . . . . . . . . . . . A <
0000a0 20 20 20 20 20 20 20 20 31 20 20 20 20 20 20 20 > 1 <
0000b0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 > <
*
000270 20 20 20 20 20 20 20 20 d0 81 0b 0e 00 20 00 18 > ..... ..<
000280 00 00 52 65 63 30 30 31 30 20 20 20 20 20 20 20 >..Rec0010 <
000290 00 00 00 01 86 21 22 00 00 00 08 1b 99 41 20 20 > . . . . . ! " . . . . . . A <
0002a0 20 20 20 20 20 20 20 20 31 20 20 20 20 20 20 20 > 1 <
0002b0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 > <
*
000470 20 20 20 20 20 20 20 20 d0 81 0b 0e 00 00 00 20 > ....... <
000480 02 00 52 65 63 30 30 32 30 20 20 20 20 20 20 20 >..Rec0020 <
000490 00 00 00 01 86 18 a1 00 00 00 04 01 3e 41 20 20 > . . . . . . . . . . . . > A <
0004a0 20 20 20 20 20 20 20 20 31 20 20 20 20 20 20 20 > 1 <
0004b0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 > <
3) Purge Garbage Space
4. Purge Garbage Space
Page Header
• Garbage Pointer => Rec0010
• Garbage Size : 0x200
• Last Insert : 0
• PAGE_N_RECS : 4
Rec0000
• Next Record : Rec0020
Rec0010
• Next Record : Null
• Info Flags 0x20UL (Deleted Bit)
MySQL Deep Internal
© Copyrights 2001~2017 EXEM CO.,LTD. All Rights Reserved.
MySQL Deep Internal3) Purge Garbage Space
5. Delete from exem_i.t1 where c1 = 'Rec0020' ;
FIL Header
• Checksum:0x89dd891a
• LSN : 0xf7f37ec
Rec0002
• Info Flags 0x20UL (Deleted Bit)
FIL Trailer
• Checksum : 0x89dd891a
• LSN : 0xf7f37ec
000000 89 dd 89 1a 00 00 00 03 ff ff ff ff ff ff ff ff > . . . . . . . . . . . . . . . . <
000010 00 00 00 00 0f 7f 37 ec 45 bf 00 00 00 00 00 00 > . . . . . . 7 . E . . . . . . . <
000020 00 00 00 00 00 e0 00 02 0a 78 80 07 02 82 02 00 > . . . . . . . . . x . . . . . . <
000030 00 00 00 02 00 04 00 04 00 00 00 00 00 00 00 00 > . . . . . . . . . . . . . . . . <
000040 00 00 00 00 00 00 00 00 00 da 00 00 00 e0 00 00 > . . . . . . . . . . . . . . . . <
000050 00 02 00 f2 00 00 00 e0 00 00 00 02 00 32 01 00 > . . . . . . . . . . . . . 2 . . <
000060 02 00 1f 69 6e 66 69 6d 75 6d 00 05 00 0b 00 00 > . . . i n f i m u m . . . . . . <
000070 73 75 70 72 65 6d 75 6d d0 81 0b 0e 00 00 00 10 >supremum........<
000080 04 00 52 65 63 30 30 30 30 20 20 20 20 20 20 20 >..Rec0000 <
000090 00 00 00 01 86 18 a1 00 00 00 04 01 10 41 20 20 > . . . . . . . . . . . . . A <
0000a0 20 20 20 20 20 20 20 20 31 20 20 20 20 20 20 20 > 1 <
0000b0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 > <
*
000270 20 20 20 20 20 20 20 20 d0 81 0b 0e 00 20 00 18 > . . . . . . . <
000280 00 00 52 65 63 30 30 31 30 20 20 20 20 20 20 20 >..Rec0010 <
000290 00 00 00 01 86 21 22 00 00 00 08 1b 99 41 20 20 > . . . . . ! " . . . . . . A <
0002a0 20 20 20 20 20 20 20 20 31 20 20 20 20 20 20 20 > 1 <
0002b0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 > <
*
000470 20 20 20 20 20 20 20 20 d0 81 0b 0e 00 20 00 20 > ... .. . <
000480 02 00 52 65 63 30 30 32 30 20 20 20 20 20 20 20 >..Rec0020 <
000490 00 00 00 01 86 23 21 00 00 00 0a 29 92 41 20 20 > . . . . . # ! . . . . ) . A <
0004a0 20 20 20 20 20 20 20 20 31 20 20 20 20 20 20 20 > 1 <
003ff0 00 00 00 00 00 70 00 63 89 dd 89 1a 0f 7f 37 ec > . . . . . p . c . . . . . . 7 . <
MySQL Deep Internal
© Copyrights 2001~2017 EXEM CO.,LTD. All Rights Reserved.
MySQL Deep Internal3) Purge Garbage Space
6. Commit ;
FIL Header
• Checksum :0xba9a2140
• LSN : 0xf7f38b4
FIL Trailer
• Checksum :0xba9a2140
• LSN : 0xf7f38b4
000000 ba 9a 21 40 00 00 00 03 ff ff ff ff ff ff ff ff >..!@............<
000010 00 00 00 00 0f 7f 38 b4 45 bf 00 00 00 00 00 00 >......8.E.......<
000020 00 00 00 00 00 e0 00 02 0a 78 80 07 02 82 02 00 >.........x......<
000030 00 00 00 02 00 04 00 04 00 00 00 00 00 00 00 00 >................<
000040 00 00 00 00 00 00 00 00 00 da 00 00 00 e0 00 00 >................<
000050 00 02 00 f2 00 00 00 e0 00 00 00 02 00 32 01 00 >.............2..<
000060 02 00 1f 69 6e 66 69 6d 75 6d 00 05 00 0b 00 00 >...infimum......<
000070 73 75 70 72 65 6d 75 6d d0 81 0b 0e 00 00 00 10 >supremum........<
000080 04 00 52 65 63 30 30 30 30 20 20 20 20 20 20 20 >..Rec0000 <
000090 00 00 00 01 86 18 a1 00 00 00 04 01 10 41 20 20 >.............A <
0000a0 20 20 20 20 20 20 20 20 31 20 20 20 20 20 20 20 > 1 <
0000b0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 > <
*
000270 20 20 20 20 20 20 20 20 d0 81 0b 0e 00 20 00 18 > ..... ..<
000280 00 00 52 65 63 30 30 31 30 20 20 20 20 20 20 20 >..Rec0010 <
000290 00 00 00 01 86 21 22 00 00 00 08 1b 99 41 20 20 >.....!"......A <
0002a0 20 20 20 20 20 20 20 20 31 20 20 20 20 20 20 20 > 1 <
0002b0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 > <
*
000470 20 20 20 20 20 20 20 20 d0 81 0b 0e 00 20 00 20 > ..... . <
000480 02 00 52 65 63 30 30 32 30 20 20 20 20 20 20 20 >..Rec0020 <
000490 00 00 00 01 86 23 21 00 00 00 0a 29 92 41 20 20 >.....#!....).A <
0004a0 20 20 20 20 20 20 20 20 31 20 20 20 20 20 20 20 > 1 <
0004b0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 > <
*
003ff0 00 00 00 00 00 70 00 63 ba 9a 21 40 0f 7f 38 b4 >.....p.c..!@..8.<
MySQL Deep Internal
© Copyrights 2001~2017 EXEM CO.,LTD. All Rights Reserved.
MySQL Deep Internal
000000 ba 9a 21 40 00 00 00 03 ff ff ff ff ff ff ff ff > . . ! @ . . . . . . . . . . . . <
000010 00 00 00 00 0f 7f 38 b4 45 bf 00 00 00 00 00 00 > . . . . . . 8 . E . . . . . . . <
000020 00 00 00 00 00 e0 00 02 0a 78 80 07 04 82 04 00 > . . . . . . . . . x . . . . . . <
000030 00 00 00 02 00 04 00 03 00 00 00 00 00 00 00 00 > . . . . . . . . . . . . . . . . <
000040 00 00 00 00 00 00 00 00 00 da 00 00 00 e0 00 00 > . . . . . . . . . . . . . . . . <
000050 00 02 00 f2 00 00 00 e0 00 00 00 02 00 32 01 00 > . . . . . . . . . . . . . 2 . . <
000060 02 00 1f 69 6e 66 69 6d 75 6d 00 04 00 0b 00 00 >...infimum......<
000070 73 75 70 72 65 6d 75 6d d0 81 0b 0e 00 00 00 10 >supremum........<
000080 06 00 52 65 63 30 30 30 30 20 20 20 20 20 20 20 >..Rec0000 <
000090 00 00 00 01 86 18 a1 00 00 00 04 01 10 41 20 20 > . . . . . . . . . . . . . A <
0000a0 20 20 20 20 20 20 20 20 31 20 20 20 20 20 20 20 > 1 <
0000b0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 > <
*
000270 20 20 20 20 20 20 20 20 d0 81 0b 0e 00 20 00 18 > ..... ..<
000280 00 00 52 65 63 30 30 31 30 20 20 20 20 20 20 20 >..Rec0010 <
000290 00 00 00 01 86 21 22 00 00 00 08 1b 99 41 20 20 > . . . . . ! " . . . . . . A <
0002a0 20 20 20 20 20 20 20 20 31 20 20 20 20 20 20 20 > 1 <
0002b0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 > <
*
000470 20 20 20 20 20 20 20 20 d0 81 0b 0e 00 20 00 20 > ..... . <
000480 fe 00 52 65 63 30 30 32 30 20 20 20 20 20 20 20 >..Rec0020 <
000490 00 00 00 01 86 23 21 00 00 00 0a 29 92 41 20 20 > . . . . . # ! . . . . ) . A <
0004a0 20 20 20 20 20 20 20 20 31 20 20 20 20 20 20 20 > 1 <
0004b0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 > <
*
000670 20 20 20 20 20 20 20 20 d0 81 0b 0e 00 00 00 28 > .......(<
000680 02 00 52 65 63 30 30 33 30 20 20 20 20 20 20 20 >..Rec0030 <
000690 00 00 00 01 86 18 a1 00 00 00 04 01 55 41 20 20 > . . . . . . . . . . . . U A <
0006a0 20 20 20 20 20 20 20 20 31 20 20 20 20 20 20 20 > 1 <
0006b0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 > <
3) Purge Garbage Space
Page Header
• PAGE_N_RECS : 3
• Garbage Offset : Rec0020
• Garbage Size : 0x400
Rec0000
• Next Record : Rec0030
Rec0020
• Next Record : Rec0010
7. Purge Garbage Space
© Copyrights 2001~2017 EXEM CO.,LTD. All Rights Reserved.
NAVER http://cafe.naver.com/playexem
ITPUB (中) http://blog.itpub.net/31135309/
Wordpress https://playexem.wordpress.com/
Slideshare http://www.slideshare.net/playexem
교육 문의 edu@ex-em.com
EXEM Research & Contents Team
Youtube https://www.youtube.com/channel/UC5wKR
_-A0eL_Pn_EMzoauJg
Tudou (中) http://www.tudou.com/home/maxgauge/
© Copyrights 2001~2017 EXEM CO.,LTD. All Rights Reserved.
감사합니다

More Related Content

What's hot

DB Time, Average Active Sessions, and ASH Math - Oracle performance fundamentals
DB Time, Average Active Sessions, and ASH Math - Oracle performance fundamentalsDB Time, Average Active Sessions, and ASH Math - Oracle performance fundamentals
DB Time, Average Active Sessions, and ASH Math - Oracle performance fundamentalsJohn Beresniewicz
 
MySQL8.0_performance_schema.pptx
MySQL8.0_performance_schema.pptxMySQL8.0_performance_schema.pptx
MySQL8.0_performance_schema.pptxNeoClova
 
The MySQL Query Optimizer Explained Through Optimizer Trace
The MySQL Query Optimizer Explained Through Optimizer TraceThe MySQL Query Optimizer Explained Through Optimizer Trace
The MySQL Query Optimizer Explained Through Optimizer Traceoysteing
 
MySQL Server Backup, Restoration, And Disaster Recovery Planning Presentation
MySQL Server Backup, Restoration, And Disaster Recovery Planning PresentationMySQL Server Backup, Restoration, And Disaster Recovery Planning Presentation
MySQL Server Backup, Restoration, And Disaster Recovery Planning PresentationColin Charles
 
SQL Plan Directives explained
SQL Plan Directives explainedSQL Plan Directives explained
SQL Plan Directives explainedMauro Pagano
 
ClickHouse Deep Dive, by Aleksei Milovidov
ClickHouse Deep Dive, by Aleksei MilovidovClickHouse Deep Dive, by Aleksei Milovidov
ClickHouse Deep Dive, by Aleksei MilovidovAltinity Ltd
 
AWS 환경에서 MySQL BMT
AWS 환경에서 MySQL BMTAWS 환경에서 MySQL BMT
AWS 환경에서 MySQL BMTI Goo Lee
 
Storing time series data with Apache Cassandra
Storing time series data with Apache CassandraStoring time series data with Apache Cassandra
Storing time series data with Apache CassandraPatrick McFadin
 
Maxscale switchover, failover, and auto rejoin
Maxscale switchover, failover, and auto rejoinMaxscale switchover, failover, and auto rejoin
Maxscale switchover, failover, and auto rejoinWagner Bianchi
 
MySQL GTID 시작하기
MySQL GTID 시작하기MySQL GTID 시작하기
MySQL GTID 시작하기I Goo Lee
 
Secondary Index Search in InnoDB
Secondary Index Search in InnoDBSecondary Index Search in InnoDB
Secondary Index Search in InnoDBMIJIN AN
 
MySQL Day Paris 2018 - Upgrade from MySQL 5.7 to MySQL 8.0
MySQL Day Paris 2018 - Upgrade from MySQL 5.7 to MySQL 8.0MySQL Day Paris 2018 - Upgrade from MySQL 5.7 to MySQL 8.0
MySQL Day Paris 2018 - Upgrade from MySQL 5.7 to MySQL 8.0Olivier DASINI
 
Less05 asm instance
Less05 asm instanceLess05 asm instance
Less05 asm instanceAmit Bhalla
 
Evolution of MySQL Parallel Replication
Evolution of MySQL Parallel Replication Evolution of MySQL Parallel Replication
Evolution of MySQL Parallel Replication Mydbops
 
Troubleshooting Complex Performance issues - Oracle SEG$ contention
Troubleshooting Complex Performance issues - Oracle SEG$ contentionTroubleshooting Complex Performance issues - Oracle SEG$ contention
Troubleshooting Complex Performance issues - Oracle SEG$ contentionTanel Poder
 
PL22 - Backup and Restore Performance.pptx
PL22 - Backup and Restore Performance.pptxPL22 - Backup and Restore Performance.pptx
PL22 - Backup and Restore Performance.pptxVinicius M Grippa
 
Chasing the optimizer
Chasing the optimizerChasing the optimizer
Chasing the optimizerMauro Pagano
 
MySQL Administrator 2021 - 네오클로바
MySQL Administrator 2021 - 네오클로바MySQL Administrator 2021 - 네오클로바
MySQL Administrator 2021 - 네오클로바NeoClova
 
Galera Cluster for MySQL vs MySQL (NDB) Cluster: A High Level Comparison
Galera Cluster for MySQL vs MySQL (NDB) Cluster: A High Level Comparison Galera Cluster for MySQL vs MySQL (NDB) Cluster: A High Level Comparison
Galera Cluster for MySQL vs MySQL (NDB) Cluster: A High Level Comparison Severalnines
 

What's hot (20)

DB Time, Average Active Sessions, and ASH Math - Oracle performance fundamentals
DB Time, Average Active Sessions, and ASH Math - Oracle performance fundamentalsDB Time, Average Active Sessions, and ASH Math - Oracle performance fundamentals
DB Time, Average Active Sessions, and ASH Math - Oracle performance fundamentals
 
MySQL8.0_performance_schema.pptx
MySQL8.0_performance_schema.pptxMySQL8.0_performance_schema.pptx
MySQL8.0_performance_schema.pptx
 
The MySQL Query Optimizer Explained Through Optimizer Trace
The MySQL Query Optimizer Explained Through Optimizer TraceThe MySQL Query Optimizer Explained Through Optimizer Trace
The MySQL Query Optimizer Explained Through Optimizer Trace
 
MySQL Server Backup, Restoration, And Disaster Recovery Planning Presentation
MySQL Server Backup, Restoration, And Disaster Recovery Planning PresentationMySQL Server Backup, Restoration, And Disaster Recovery Planning Presentation
MySQL Server Backup, Restoration, And Disaster Recovery Planning Presentation
 
SQL Plan Directives explained
SQL Plan Directives explainedSQL Plan Directives explained
SQL Plan Directives explained
 
TiDB Introduction
TiDB IntroductionTiDB Introduction
TiDB Introduction
 
ClickHouse Deep Dive, by Aleksei Milovidov
ClickHouse Deep Dive, by Aleksei MilovidovClickHouse Deep Dive, by Aleksei Milovidov
ClickHouse Deep Dive, by Aleksei Milovidov
 
AWS 환경에서 MySQL BMT
AWS 환경에서 MySQL BMTAWS 환경에서 MySQL BMT
AWS 환경에서 MySQL BMT
 
Storing time series data with Apache Cassandra
Storing time series data with Apache CassandraStoring time series data with Apache Cassandra
Storing time series data with Apache Cassandra
 
Maxscale switchover, failover, and auto rejoin
Maxscale switchover, failover, and auto rejoinMaxscale switchover, failover, and auto rejoin
Maxscale switchover, failover, and auto rejoin
 
MySQL GTID 시작하기
MySQL GTID 시작하기MySQL GTID 시작하기
MySQL GTID 시작하기
 
Secondary Index Search in InnoDB
Secondary Index Search in InnoDBSecondary Index Search in InnoDB
Secondary Index Search in InnoDB
 
MySQL Day Paris 2018 - Upgrade from MySQL 5.7 to MySQL 8.0
MySQL Day Paris 2018 - Upgrade from MySQL 5.7 to MySQL 8.0MySQL Day Paris 2018 - Upgrade from MySQL 5.7 to MySQL 8.0
MySQL Day Paris 2018 - Upgrade from MySQL 5.7 to MySQL 8.0
 
Less05 asm instance
Less05 asm instanceLess05 asm instance
Less05 asm instance
 
Evolution of MySQL Parallel Replication
Evolution of MySQL Parallel Replication Evolution of MySQL Parallel Replication
Evolution of MySQL Parallel Replication
 
Troubleshooting Complex Performance issues - Oracle SEG$ contention
Troubleshooting Complex Performance issues - Oracle SEG$ contentionTroubleshooting Complex Performance issues - Oracle SEG$ contention
Troubleshooting Complex Performance issues - Oracle SEG$ contention
 
PL22 - Backup and Restore Performance.pptx
PL22 - Backup and Restore Performance.pptxPL22 - Backup and Restore Performance.pptx
PL22 - Backup and Restore Performance.pptx
 
Chasing the optimizer
Chasing the optimizerChasing the optimizer
Chasing the optimizer
 
MySQL Administrator 2021 - 네오클로바
MySQL Administrator 2021 - 네오클로바MySQL Administrator 2021 - 네오클로바
MySQL Administrator 2021 - 네오클로바
 
Galera Cluster for MySQL vs MySQL (NDB) Cluster: A High Level Comparison
Galera Cluster for MySQL vs MySQL (NDB) Cluster: A High Level Comparison Galera Cluster for MySQL vs MySQL (NDB) Cluster: A High Level Comparison
Galera Cluster for MySQL vs MySQL (NDB) Cluster: A High Level Comparison
 

Similar to Innodb에서의 Purge 메커니즘 deep internal (by 이근오)

[Pgday.Seoul 2017] 3. PostgreSQL WAL Buffers, Clog Buffers Deep Dive - 이근오
[Pgday.Seoul 2017] 3. PostgreSQL WAL Buffers, Clog Buffers Deep Dive - 이근오[Pgday.Seoul 2017] 3. PostgreSQL WAL Buffers, Clog Buffers Deep Dive - 이근오
[Pgday.Seoul 2017] 3. PostgreSQL WAL Buffers, Clog Buffers Deep Dive - 이근오PgDay.Seoul
 
Query optimization techniques for partitioned tables.
Query optimization techniques for partitioned tables.Query optimization techniques for partitioned tables.
Query optimization techniques for partitioned tables.Ashutosh Bapat
 
Partition and conquer large data in PostgreSQL 10
Partition and conquer large data in PostgreSQL 10Partition and conquer large data in PostgreSQL 10
Partition and conquer large data in PostgreSQL 10Ashutosh Bapat
 
PE102 - a Windows executable format overview (booklet V1)
PE102 - a Windows executable format overview (booklet V1)PE102 - a Windows executable format overview (booklet V1)
PE102 - a Windows executable format overview (booklet V1)Ange Albertini
 
The forgotten art of assembly
The forgotten art of assemblyThe forgotten art of assembly
The forgotten art of assemblyMarian Marinov
 
MySQL 8 -- A new beginning : Sunshine PHP/PHP UK (updated)
MySQL 8 -- A new beginning : Sunshine PHP/PHP UK (updated)MySQL 8 -- A new beginning : Sunshine PHP/PHP UK (updated)
MySQL 8 -- A new beginning : Sunshine PHP/PHP UK (updated)Dave Stokes
 
Fundamentals of Complete Crash and Hang Memory Dump Analysis
Fundamentals of Complete Crash and Hang Memory Dump AnalysisFundamentals of Complete Crash and Hang Memory Dump Analysis
Fundamentals of Complete Crash and Hang Memory Dump AnalysisDmitry Vostokov
 
Whose Stack Is It Anyway?
Whose Stack Is It Anyway?Whose Stack Is It Anyway?
Whose Stack Is It Anyway?Ian Thomas
 
Fundamentals of Physical Memory Analysis
Fundamentals of Physical Memory AnalysisFundamentals of Physical Memory Analysis
Fundamentals of Physical Memory AnalysisDmitry Vostokov
 
MySQL Optimizer: What’s New in 8.0
MySQL Optimizer: What’s New in 8.0MySQL Optimizer: What’s New in 8.0
MySQL Optimizer: What’s New in 8.0oysteing
 
Webinar: Secrets of ClickHouse Query Performance, by Robert Hodges
Webinar: Secrets of ClickHouse Query Performance, by Robert HodgesWebinar: Secrets of ClickHouse Query Performance, by Robert Hodges
Webinar: Secrets of ClickHouse Query Performance, by Robert HodgesAltinity Ltd
 
ClickHouse Query Performance Tips and Tricks, by Robert Hodges, Altinity CEO
ClickHouse Query Performance Tips and Tricks, by Robert Hodges, Altinity CEOClickHouse Query Performance Tips and Tricks, by Robert Hodges, Altinity CEO
ClickHouse Query Performance Tips and Tricks, by Robert Hodges, Altinity CEOAltinity Ltd
 
HandlerSocket plugin for MySQL (English)
HandlerSocket plugin for MySQL (English)HandlerSocket plugin for MySQL (English)
HandlerSocket plugin for MySQL (English)akirahiguchi
 
Examining Oracle GoldenGate Trail Files
Examining Oracle GoldenGate Trail FilesExamining Oracle GoldenGate Trail Files
Examining Oracle GoldenGate Trail FilesBobby Curtis
 
Webinar slides: MORE secrets of ClickHouse Query Performance. By Robert Hodge...
Webinar slides: MORE secrets of ClickHouse Query Performance. By Robert Hodge...Webinar slides: MORE secrets of ClickHouse Query Performance. By Robert Hodge...
Webinar slides: MORE secrets of ClickHouse Query Performance. By Robert Hodge...Altinity Ltd
 
Windows Debugging with WinDbg
Windows Debugging with WinDbgWindows Debugging with WinDbg
Windows Debugging with WinDbgArno Huetter
 
ClickHouse tips and tricks. Webinar slides. By Robert Hodges, Altinity CEO
ClickHouse tips and tricks. Webinar slides. By Robert Hodges, Altinity CEOClickHouse tips and tricks. Webinar slides. By Robert Hodges, Altinity CEO
ClickHouse tips and tricks. Webinar slides. By Robert Hodges, Altinity CEOAltinity Ltd
 
M|18 Understanding the Architecture of MariaDB ColumnStore
M|18 Understanding the Architecture of MariaDB ColumnStoreM|18 Understanding the Architecture of MariaDB ColumnStore
M|18 Understanding the Architecture of MariaDB ColumnStoreMariaDB plc
 

Similar to Innodb에서의 Purge 메커니즘 deep internal (by 이근오) (20)

[Pgday.Seoul 2017] 3. PostgreSQL WAL Buffers, Clog Buffers Deep Dive - 이근오
[Pgday.Seoul 2017] 3. PostgreSQL WAL Buffers, Clog Buffers Deep Dive - 이근오[Pgday.Seoul 2017] 3. PostgreSQL WAL Buffers, Clog Buffers Deep Dive - 이근오
[Pgday.Seoul 2017] 3. PostgreSQL WAL Buffers, Clog Buffers Deep Dive - 이근오
 
Query optimization techniques for partitioned tables.
Query optimization techniques for partitioned tables.Query optimization techniques for partitioned tables.
Query optimization techniques for partitioned tables.
 
Partition and conquer large data in PostgreSQL 10
Partition and conquer large data in PostgreSQL 10Partition and conquer large data in PostgreSQL 10
Partition and conquer large data in PostgreSQL 10
 
PE102 - a Windows executable format overview (booklet V1)
PE102 - a Windows executable format overview (booklet V1)PE102 - a Windows executable format overview (booklet V1)
PE102 - a Windows executable format overview (booklet V1)
 
The forgotten art of assembly
The forgotten art of assemblyThe forgotten art of assembly
The forgotten art of assembly
 
MySQL 8 -- A new beginning : Sunshine PHP/PHP UK (updated)
MySQL 8 -- A new beginning : Sunshine PHP/PHP UK (updated)MySQL 8 -- A new beginning : Sunshine PHP/PHP UK (updated)
MySQL 8 -- A new beginning : Sunshine PHP/PHP UK (updated)
 
Fundamentals of Complete Crash and Hang Memory Dump Analysis
Fundamentals of Complete Crash and Hang Memory Dump AnalysisFundamentals of Complete Crash and Hang Memory Dump Analysis
Fundamentals of Complete Crash and Hang Memory Dump Analysis
 
Operating System Engineering
Operating System EngineeringOperating System Engineering
Operating System Engineering
 
Whose Stack Is It Anyway?
Whose Stack Is It Anyway?Whose Stack Is It Anyway?
Whose Stack Is It Anyway?
 
Fundamentals of Physical Memory Analysis
Fundamentals of Physical Memory AnalysisFundamentals of Physical Memory Analysis
Fundamentals of Physical Memory Analysis
 
MySQL Optimizer: What’s New in 8.0
MySQL Optimizer: What’s New in 8.0MySQL Optimizer: What’s New in 8.0
MySQL Optimizer: What’s New in 8.0
 
Webinar: Secrets of ClickHouse Query Performance, by Robert Hodges
Webinar: Secrets of ClickHouse Query Performance, by Robert HodgesWebinar: Secrets of ClickHouse Query Performance, by Robert Hodges
Webinar: Secrets of ClickHouse Query Performance, by Robert Hodges
 
ClickHouse Query Performance Tips and Tricks, by Robert Hodges, Altinity CEO
ClickHouse Query Performance Tips and Tricks, by Robert Hodges, Altinity CEOClickHouse Query Performance Tips and Tricks, by Robert Hodges, Altinity CEO
ClickHouse Query Performance Tips and Tricks, by Robert Hodges, Altinity CEO
 
HandlerSocket plugin for MySQL (English)
HandlerSocket plugin for MySQL (English)HandlerSocket plugin for MySQL (English)
HandlerSocket plugin for MySQL (English)
 
Examining Oracle GoldenGate Trail Files
Examining Oracle GoldenGate Trail FilesExamining Oracle GoldenGate Trail Files
Examining Oracle GoldenGate Trail Files
 
Webinar slides: MORE secrets of ClickHouse Query Performance. By Robert Hodge...
Webinar slides: MORE secrets of ClickHouse Query Performance. By Robert Hodge...Webinar slides: MORE secrets of ClickHouse Query Performance. By Robert Hodge...
Webinar slides: MORE secrets of ClickHouse Query Performance. By Robert Hodge...
 
Achievements
AchievementsAchievements
Achievements
 
Windows Debugging with WinDbg
Windows Debugging with WinDbgWindows Debugging with WinDbg
Windows Debugging with WinDbg
 
ClickHouse tips and tricks. Webinar slides. By Robert Hodges, Altinity CEO
ClickHouse tips and tricks. Webinar slides. By Robert Hodges, Altinity CEOClickHouse tips and tricks. Webinar slides. By Robert Hodges, Altinity CEO
ClickHouse tips and tricks. Webinar slides. By Robert Hodges, Altinity CEO
 
M|18 Understanding the Architecture of MariaDB ColumnStore
M|18 Understanding the Architecture of MariaDB ColumnStoreM|18 Understanding the Architecture of MariaDB ColumnStore
M|18 Understanding the Architecture of MariaDB ColumnStore
 

Recently uploaded

Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 

Recently uploaded (20)

Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 

Innodb에서의 Purge 메커니즘 deep internal (by 이근오)

  • 1. © Copyrights 2001~2017 EXEM CO.,LTD. All Rights Reserved. InnoDB의 Purge 메커니즘 엑셈 | 이근오 부장
  • 2. © Copyrights 2001~2017 EXEM CO.,LTD. All Rights Reserved. 03. Purge Garbage Space 01. Purge 정의 및 필요성 02. Purge Update Undo Table of Agenda
  • 3. © Copyrights 2001~2017 EXEM CO.,LTD. All Rights Reserved. 1) Purge 정의 및 필요성
  • 4. MySQL Deep Internal © Copyrights 2001~2017 EXEM CO.,LTD. All Rights Reserved. MySQL Deep Internal1) Purge 정의 및 필요성 • History list가 길어져 before-image가 필요한 쿼리의 성능 저하를 방지하기 위해서 • 변경 및 삭제된 자료들이 차지하고 있는 디스크 공간을 확보하기 위해 2. Purge의 필요성 1. Purge의 정의 데이터의 변경이 발생하였을 때, 다른 트랜잭션의 읽기 일관성(MVCC)을 위해 변경 전의 데이터를 롤백 세그먼트에 기록해둔다. 이 데이터가 더 이상 필요하지 않게 되면 해당 세그먼트를 재사용하기 위해 청소하는 것을 의미한다.
  • 5. © Copyrights 2001~2017 EXEM CO.,LTD. All Rights Reserved. 2) Purge Update Undo
  • 6. MySQL Deep Internal © Copyrights 2001~2017 EXEM CO.,LTD. All Rights Reserved. MySQL Deep Internal2) Purge Update Undo source: http://blog.jcole.us/2013/01/04/page-management-in-innodb-space-files/ FIL HEADER (38) List node for INODE Page list (12) INODE 0 (192) INODE 1 (192) INODE 2 (192) … INODE 83 (192) INODE 84 (192) (Empty Space, 6 Bytes) FIL Trailer (8) FSEG ID (8) Number of used pages in “NOT_FULL”list (4) List base node for “FREE” list (16) List base node for “NOT_FULL” list (16) List base node for “FULL” list (16) Magic Number = 97937874 (4) Fragment Array Entry 0 (4) … Fragment Array Entry 31 (4) INODE Overview INODE Entry
  • 7. MySQL Deep Internal © Copyrights 2001~2017 EXEM CO.,LTD. All Rights Reserved. MySQL Deep Internal2) Purge Update Undo source: http://mysqldba.tistory.com/126 테이블스페이스 내의 세그먼트 정보를 얻기 위해 사용 Element Description File Segment ID - 파일 세그먼트의 ID값 - 값이 0 이면, entry를 사용하지 않았다는 의미 Number of used pages in the NOT_NULL list - File Space Header의 FREE_FRAG 리스트와 비슷함 ( *FREE_FRAG : fragments에 사용된다고 할당된 extent에서 아직 사용하지 않은 페이지들을 가진 extent) - NOT_FULL 리스트에서 사용하는 page number를 기록 FREE - 파일 세그먼트에 할당되었지만, 한번도 사용하지 않은 extent를 가진 리스트 NOT_FULL - 파일 세그먼트에 할당된 것 중 적어도 하나는 사용한 extent를 가진 리스트 - 마지막에 남은 free page가 사용되면, 이 extent는 FULL 리스트로 넘어감 FULL - File segment에 할당된 페이지를 전부 사용하고 있는 extent를 가진 리스트 - 페이지 하나라도 free 상태로 변경된다면, 이 extent는 NOT_FULL 리스트로 넘어감 Magic Number - Marker로서 97937874라는 값이 저장되는데, 이것은 file segment INODE의 초기화를 의미 Fragment Array - FREE_FRAG 또는 FULL_FRAG에 있는 extent로 부터 개별적으로 할당된 페이지들의 array ( *FULL_FRAG : 남아있는 free page가 없는 경우에 위치) • INODE Entry
  • 8. MySQL Deep Internal © Copyrights 2001~2017 EXEM CO.,LTD. All Rights Reserved. MySQL Deep Internal show engine innodb status; Trx id counter : 21430 History list length : 0 undo001 space 1 Page 0 Page 1 Page 2 Page 3 Page 4 Page 5 … Page 8 2) Purge Update Undo Page (8f,3) Rec0000, A, 199 Rec0010, A, 199 Rec0020, A, 199 Rec0030, A, 199 Rec0040, A, 199 T1.ibd space 8f Page 0 Page 1 Page 2 Page 3 … Page 64 User Tablespace Undo Tablespace HISTORY_SIZE = 0 First Page No/Offset = FF/0 Last Page No/Offset = FF/0 slot 0 00 00 00 04 slot 1 … slot 1023 FSEG_ID PAGE_NO 00 00 00 01 00 00 00 03 00 00 00 04 00 00 00 04 (1,3) Rollback Segment(1,2) INODE
  • 9. MySQL Deep Internal © Copyrights 2001~2017 EXEM CO.,LTD. All Rights Reserved. MySQL Deep Internal HISTORY_SIZE = 0 First Page No/Offset = FF/0 Last Page No/Offset = FF/0 slot 0 00 00 00 04 slot 1 00 00 00 05 … slot 1023 FSEG_ID PAGE_NO 00 00 00 01 00 00 00 03 00 00 00 04 00 00 00 04 00 00 1a d2 00 00 00 05 (1,3) Rollback Segment(1,2) INODE undo001 space 1 Page 0 Page 1 Page 2 Page 3 Page 4 Page 5 … Page 8 Page (8f,3) Rec0000, A, 200 Rec0010, A, 200 Rec0020, A, 200 Rec0030, A, 200 Rec0040, A, 200 T1.ibd space 8f Page 0 Page 1 Page 2 Page 3 … Page 64 User Tablespace Undo Tablespace Page (1,5) Trx_id : 0x53b6 Trx_no : 0x00 Rec0000, A, 199 2) Purge Update Undo show engine innodb status; Trx id counter : 21430 History list length : 0 Begin; Update t1 set c3=c3+1;
  • 10. MySQL Deep Internal © Copyrights 2001~2017 EXEM CO.,LTD. All Rights Reserved. MySQL Deep Internal HISTORY_SIZE = 1 First Page No/Offset = 05/78 Last Page No/Offset = 05/78 slot 0 00 00 00 04 slot 1 … slot 1023 FSEG_ID PAGE_NO 00 00 00 01 00 00 00 03 00 00 00 04 00 00 00 04 00 00 1a d2 00 00 00 05 undo001 space 1 Page 0 Page 1 Page 2 Page 3 Page 4 Page 5 … Page 8 2) Purge Update Undo Page (8f,3) Rec0000, A, 200 Rec0010, A, 200 Rec0020, A, 200 Rec0030, A, 200 Rec0040, A, 200 T1.ibd space 8f Page 0 Page 1 Page 2 Page 3 … Page 64 User Tablespace Undo Tablespace Page (1,5) Trx_id : 0x53b6 Trx_no : 0x53b7 Rec0000, A, 199 (1,3) Rollback Segment(1,2) INODE show engine innodb status; Trx id counter : 21432 History list length : 1 Commit;
  • 11. MySQL Deep Internal © Copyrights 2001~2017 EXEM CO.,LTD. All Rights Reserved. MySQL Deep Internal HISTORY_SIZE = 1 First Page No/Offset = 05/78 Last Page No/Offset = 05/78 slot 0 00 00 00 04 slot 1 00 00 00 06 … slot 1023 FSEG_ID PAGE_NO 00 00 00 01 00 00 00 03 00 00 00 04 00 00 00 04 00 00 1a d2 00 00 00 05 00 00 1a d3 00 00 00 06 undo001 space 1 Page 0 Page 1 Page 2 Page 3 Page 4 Page 5 Page 6 … 2) Purge Update Undo Page (8f,3) Rec0000, A, 201 Rec0010, A, 201 Rec0020, A, 201 Rec0030, A, 201 Rec0040, A, 201 T1.ibd space 8f Page 0 Page 1 Page 2 Page 3 … Page 64 User Tablespace Undo Tablespace Page (1,6) Trx_id : 0x53b8 Trx_no : 0x00 Rec0000, A, 200 (1,3) Rollback Segment(1,2) INODE show engine innodb status; Trx id counter : 21432 History list length : 1 Begin; Update t1 set c3=c3+1;
  • 12. MySQL Deep Internal © Copyrights 2001~2017 EXEM CO.,LTD. All Rights Reserved. MySQL Deep Internal HISTORY_SIZE = 2 First Page No/Offset = 06/78 Last Page No/Offset = 05/78 slot 0 00 00 00 04 slot 1 … slot 1023 FSEG_ID PAGE_NO 00 00 00 01 00 00 00 03 00 00 00 04 00 00 00 04 00 00 1a d2 00 00 00 05 00 00 1a d3 00 00 00 06 undo001 space 1 Page 0 Page 1 Page 2 Page 3 Page 4 Page 5 Page 6 … 2) Purge Update Undo Page (8f,3) Rec0000, A, 201 Rec0010, A, 201 Rec0020, A, 201 Rec0030, A, 201 Rec0040, A, 201 T1.ibd space 8f Page 0 Page 1 Page 2 Page 3 … Page 64 User Tablespace Undo Tablespace Page (1,6) Trx_id : 0x53b8 Trx_no : 0x53b9 Rec0000, A, 200 (1,3) Rollback Segment(1,2) INODE show engine innodb status; Trx id counter : 21434 History list length : 2 Commit;
  • 13. MySQL Deep Internal © Copyrights 2001~2017 EXEM CO.,LTD. All Rights Reserved. MySQL Deep Internal HISTORY_SIZE = 2 First Page No/Offset = 06/78 Last Page No/Offset = 05/78 slot 0 00 00 00 04 slot 1 00 00 00 07 … slot 1023 FSEG_ID PAGE_NO 00 00 00 01 00 00 00 03 00 00 00 04 00 00 00 04 00 00 1a d2 00 00 00 05 00 00 1a d3 00 00 00 06 00 00 1a d4 00 00 00 07 undo001 space 1 Page 0 Page 1 Page 2 Page 3 Page 4 Page 5 … Page 7 2) Purge Update Undo Page (8f,3) Rec0000, A, 202 Rec0010, A, 202 Rec0020, A, 202 Rec0030, A, 202 Rec0040, A, 202 T1.ibd space 8f Page 0 Page 1 Page 2 Page 3 … Page 64 User Tablespace Undo Tablespace Page (1,7) Trx_id : 0x53ba Trx_no : 0x00 Rec0000, A, 201 (1,3) Rollback Segment(1,2) INODE show engine innodb status; Trx id counter : 21434 History list length : 2 Begin; Update t1 set c3=c3+1;
  • 14. MySQL Deep Internal © Copyrights 2001~2017 EXEM CO.,LTD. All Rights Reserved. MySQL Deep Internal HISTORY_SIZE = 3 First Page No/Offset = 07/78 Last Page No/Offset = 05/78 slot 0 00 00 00 04 slot 1 … slot 1023 FSEG_ID PAGE_NO 00 00 00 01 00 00 00 03 00 00 00 04 00 00 00 04 00 00 1a d2 00 00 00 05 00 00 1a d3 00 00 00 06 00 00 1a d4 00 00 00 07 undo001 space 1 Page 0 Page 1 Page 2 Page 3 Page 4 Page 5 … Page 7 2) Purge Update Undo Page (8f,3) Rec0000, A, 202 Rec0010, A, 202 Rec0020, A, 202 Rec0030, A, 202 Rec0040, A, 202 T1.ibd space 8f Page 0 Page 1 Page 2 Page 3 … Page 64 User Tablespace Undo Tablespace Page (1,7) Trx_id : 0x53ba Trx_no : 0x53bb Rec0000, A, 201 (1,3) Rollback Segment(1,2) INODE show engine innodb status; Trx id counter : 21436 History list length : 3 Commit;
  • 15. MySQL Deep Internal © Copyrights 2001~2017 EXEM CO.,LTD. All Rights Reserved. MySQL Deep Internal HISTORY_SIZE = 2d First Page No/Offset = 31/78 Last Page No/Offset = 05/78 slot 0 00 00 00 04 slot 1 00 00 00 32 … slot 1023 FSEG_ID PAGE_NO 00 00 00 01 00 00 00 03 00 00 00 04 00 00 00 04 00 00 1a d2 00 00 00 05 … … 00 00 1a ff 00 00 00 32 undo001 space 1 Page 0 Page 1 Page 2 Page 3 Page 4 Page 5 … Page 32 2) Purge Update Undo Page (8f,3) Rec0000, A, 245 Rec0010, A, 245 Rec0020, A, 245 Rec0030, A, 245 Rec0040, A, 245 T1.ibd space 8f Page 0 Page 1 Page 2 Page 3 … Page 64 User Tablespace Undo Tablespace Page (1,32) Trx_id : 0x5410 Trx_no : 0x00 Rec0000, A, 244 (1,3) Rollback Segment(1,2) INODE show engine innodb status; Trx id counter : 21520 History list length : 45 Begin; Update t1 set c3=c3+1;
  • 16. MySQL Deep Internal © Copyrights 2001~2017 EXEM CO.,LTD. All Rights Reserved. MySQL Deep Internal HISTORY_SIZE = 0 First Page No/Offset = FF/0 Last Page No/Offset = FF/0 slot 0 00 00 00 04 slot 1 … slot 1023 FSEG_ID PAGE_NO 00 00 00 01 00 00 00 03 00 00 00 04 00 00 00 04 undo001 space 1 Page 0 Page 1 Page 2 Page 3 Page 4 Page 5 … Page 32 2) Purge Update Undo Page (8f,3) Rec0000, A, 245 Rec0010, A, 245 Rec0020, A, 245 Rec0030, A, 245 Rec0040, A, 245 T1.ibd space 8f Page 0 Page 1 Page 2 Page 3 … Page 64 User Tablespace Undo Tablespace Page (1,32) Trx_id : 0x5410 Trx_no : 0x5411 Rec0000, A, 244 (1,3) Rollback Segment(1,2) INODE • Update Undo가 Purge 됨 • History list length : 2d  0 • First/Last Page 정보 초기화 • INODE : 05 ~ 32 페이지 정보 초기화 show engine innodb status; Trx id counter : 21522 History list length : 0 Commit;
  • 17. © Copyrights 2001~2017 EXEM CO.,LTD. All Rights Reserved. 3) Purge Garbage Space
  • 18. MySQL Deep Internal © Copyrights 2001~2017 EXEM CO.,LTD. All Rights Reserved. MySQL Deep Internal 정의 및 목적 • 레코드를 삭제할 경우, 바로 삭제되지 않고 해당 레코드 헤더에 위치한 ‘Info_flags’ (4 bit)의 bit를 2로 설정 • Purge Thread가 Commit이 적용된 페이지 헤더에 위치한 Garbage Offset을 설정함으로써 해당 공간을 재사용 ( * Garbage Offset = start of page free record list pointer) • 2건 이상 Delete, Commit될 경우, Garbage Offset은 가장 마지막에 삭제된 레코드의 포인터를 가지며, 가장 마지막에 삭제된 행은 그 이전에 삭제된 행의 포인터를 가짐으로써 삭제된 공간의 재사용은 마지막부터 시작 3) Purge Garbage Space T1.ibd space (Space ID : e0) Page 0 Page 1 … Page 3 … Page 64 REC 001 x 시작주소 사이즈 I S
  • 19. MySQL Deep Internal © Copyrights 2001~2017 EXEM CO.,LTD. All Rights Reserved. MySQL Deep Internal 1. Insert into exem_i.t1 values ('Rec0000','A','1 ') ... ('Rec0040','A','1'); FIL Header • PAGE_N_RECS : 5 • Last Insert : Rec0040 • Checksum : 0x9732acfa • LSN : 0x0f7f2cbe 3) Purge Garbage Space 000000 97 32 ac fa 00 00 00 03 ff ff ff ff ff ff ff ff > . 2 . . . . . . . . . . . . . . < 000010 00 00 00 00 0f 7f 2c be 45 bf 00 00 00 00 00 00 > . . . . . . , . E . . . . . . . < 000020 00 00 00 00 00 e0 00 02 0a 78 80 07 00 00 00 00 > . . . . . . . . . x . . . . . . < 000030 08 82 00 02 00 04 00 05 00 00 00 00 00 00 00 00 > . . . . . . . . . . . . . . . . < 000040 00 00 00 00 00 00 00 00 00 da 00 00 00 e0 00 00 > . . . . . . . . . . . . . . . . < 000050 00 02 00 f2 00 00 00 e0 00 00 00 02 00 32 01 00 > . . . . . . . . . . . . . 2 . . < 000060 02 00 1f 69 6e 66 69 6d 75 6d 00 06 00 0b 00 00 >...infimum......< 000070 73 75 70 72 65 6d 75 6d d0 81 0b 0e 00 00 00 10 >supremum........< 000080 02 00 52 65 63 30 30 30 30 20 20 20 20 20 20 20 >..Rec0000 < 000090 00 00 00 01 86 18 a1 00 00 00 04 01 10 41 20 20 >.............A < 0000a0 20 20 20 20 20 20 20 20 31 20 20 20 20 20 20 20 > 1 < 0000b0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 > < * 000270 20 20 20 20 20 20 20 20 d0 81 0b 0e 00 00 00 18 > ........< 000280 02 00 52 65 63 30 30 31 30 20 20 20 20 20 20 20 >..Rec0010 < 000290 00 00 00 01 86 18 a1 00 00 00 04 01 27 41 20 20 >............ 'A < 0002a0 20 20 20 20 20 20 20 20 31 20 20 20 20 20 20 20 > 1 < 0002b0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 > < * 000470 20 20 20 20 20 20 20 20 d0 81 0b 0e 00 00 00 20 > ....... < 000480 02 00 52 65 63 30 30 32 30 20 20 20 20 20 20 20 >..Rec0020 < 000490 00 00 00 01 86 18 a1 00 00 00 04 01 3e 41 20 20 >............>A < 0004a0 20 20 20 20 20 20 20 20 31 20 20 20 20 20 20 20 > 1 < 0004b0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 > < * 000670 20 20 20 20 20 20 20 20 d0 81 0b 0e 00 00 00 28 > .......(< 000680 02 00 52 65 63 30 30 33 30 20 20 20 20 20 20 20 >..Rec0030 < 000690 00 00 00 01 86 18 a1 00 00 00 04 01 55 41 20 20 >............UA < 0006a0 20 20 20 20 20 20 20 20 31 20 20 20 20 20 20 20 > 1 < 0006b0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 > < * 000870 20 20 20 20 20 20 20 20 d0 81 0b 0e 00 00 00 30 > .......0< 000880 f7 ee 52 65 63 30 30 34 30 20 20 20 20 20 20 20 >..Rec0040 < 000890 00 00 00 01 86 18 a1 00 00 00 04 01 6c 41 20 20 >............ lA < Page Header Rec0000 • Next Record : Rec0010 Rec0040 • Next Record : supremum
  • 20. MySQL Deep Internal © Copyrights 2001~2017 EXEM CO.,LTD. All Rights Reserved. MySQL Deep Internal 000000 97 32 ac fa 00 00 00 03 ff ff ff ff ff ff ff ff > . 2 . . . . . . . . . . . . . . < 000010 00 00 00 00 0f 7f 2c be 45 bf 00 00 00 00 00 00 > . . . . . . , . E . . . . . . . < 000020 00 00 00 00 00 e0 00 02 0a 78 80 07 00 00 00 00 > . . . . . . . . . x . . . . . . < 000030 08 82 00 02 00 04 00 05 00 00 00 00 00 00 00 00 > . . . . . . . . . . . . . . . . < 000040 00 00 00 00 00 00 00 00 00 da 00 00 00 e0 00 00 > . . . . . . . . . . . . . . . . < 000050 00 02 00 f2 00 00 00 e0 00 00 00 02 00 32 01 00 > . . . . . . . . . . . . . 2 . . < 000060 02 00 1f 69 6e 66 69 6d 75 6d 00 06 00 0b 00 00 >...infimum......< 000070 73 75 70 72 65 6d 75 6d d0 81 0b 0e 00 00 00 10 >supremum........< 000080 02 00 52 65 63 30 30 30 30 20 20 20 20 20 20 20 >..Rec0000 < 000090 00 00 00 01 86 18 a1 00 00 00 04 01 10 41 20 20 >....... ... ... A < 0000a0 20 20 20 20 20 20 20 20 31 20 20 20 20 20 20 20 > 1 < 0000b0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 > < * 000270 20 20 20 20 20 20 20 20 d0 81 0b 0e 00 20 00 18 > ..... ..< 000280 02 00 52 65 63 30 30 31 30 20 20 20 20 20 20 20 >..Rec0010 < 000290 00 00 00 01 86 21 22 00 00 00 08 1b 99 41 20 20 >.....!"......A < 0002a0 20 20 20 20 20 20 20 20 31 20 20 20 20 20 20 20 > 1 < 0002b0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 > < 3) Purge Garbage Space Rec0010 • Info Flags 0x20UL (Deleted Bit) • Transaction ID(6 Bytes) • Roll Pointer(7 Bytes) 2. Begin; Delete from exem_i.t1 where c1 = 'Rec0010' ;
  • 21. MySQL Deep Internal © Copyrights 2001~2017 EXEM CO.,LTD. All Rights Reserved. MySQL Deep Internal3) Purge Garbage Space 3. Commit ; 000000 9a a7 a5 de 00 00 00 03 ff ff ff ff ff ff ff ff > . . . . . . . . . . . . . . . . < 000010 00 00 00 00 0f 7f 37 42 45 bf 00 00 00 00 00 00 > . . . . . . 7 B E . . . . . . . < 000020 00 00 00 00 00 e0 00 02 0a 78 80 07 00 00 00 00 > . . . . . . . . . x . . . . . . < 000030 08 82 00 02 00 04 00 05 00 00 00 00 00 00 00 00 > . . . . . . . . . . . . . . . . < 000040 00 00 00 00 00 00 00 00 00 da 00 00 00 e0 00 00 > . . . . . . . . . . . . . . . . < 000050 00 02 00 f2 00 00 00 e0 00 00 00 02 00 32 01 00 > . . . . . . . . . . . . . 2 . . < 000060 02 00 1f 69 6e 66 69 6d 75 6d 00 06 00 0b 00 00 > . . . i n f i m u m . . . . . . < 000070 73 75 70 72 65 6d 75 6d d0 81 0b 0e 00 00 00 10 >supremum........< 000080 02 00 52 65 63 30 30 30 30 20 20 20 20 20 20 20 >..Rec0000 < 000090 00 00 00 01 86 18 a1 00 00 00 04 01 10 41 20 20 > . . . . . . . . . . . . . A < 0000a0 20 20 20 20 20 20 20 20 31 20 20 20 20 20 20 20 > 1 < 0000b0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 > < * 000270 20 20 20 20 20 20 20 20 d0 81 0b 0e 00 20 00 18 > . . . . . . . < 000280 02 00 52 65 63 30 30 31 30 20 20 20 20 20 20 20 >..Rec0010 < 000290 00 00 00 01 86 21 22 00 00 00 08 1b 99 41 20 20 > . . . . . ! " . . . . . . A < 0002a0 20 20 20 20 20 20 20 20 31 20 20 20 20 20 20 20 > 1 < 0002b0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 > < * 000a70 20 20 20 20 20 20 20 20 00 00 00 00 00 00 00 00 > ........< 000a80 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >................< * 003ff0 00 00 00 00 00 70 00 63 9a a7 a5 de 0f 7f 37 42 >.....p.c......7B< FIL Header • Checksum : 0x9aa7a5de • LSN : 0x7f3742 FIL Trailer • Checksum : 0x9aa7a5de • LSN : 0x7f3742
  • 22. MySQL Deep Internal © Copyrights 2001~2017 EXEM CO.,LTD. All Rights Reserved. MySQL Deep Internal 000000 9a a7 a5 de 00 00 00 03 ff ff ff ff ff ff ff ff > . . . . . . . . . . . . . . . . < 000010 00 00 00 00 0f 7f 37 42 45 bf 00 00 00 00 00 00 > . . . . . . 7 B E . . . . . . . < 000020 00 00 00 00 00 e0 00 02 0a 78 80 07 02 82 02 00 > . . . . . . . . . x . . . . . . < 000030 00 00 00 02 00 04 00 04 00 00 00 00 00 00 00 00 > . . . . . . . . . . . . . . . . < 000040 00 00 00 00 00 00 00 00 00 da 00 00 00 e0 00 00 > . . . . . . . . . . . . . . . . < 000050 00 02 00 f2 00 00 00 e0 00 00 00 02 00 32 01 00 > . . . . . . . . . . . . . 2 . . < 000060 02 00 1f 69 6e 66 69 6d 75 6d 00 05 00 0b 00 00 >...infimum......< 000070 73 75 70 72 65 6d 75 6d d0 81 0b 0e 00 00 00 10 >supremum........< 000080 04 00 52 65 63 30 30 30 30 20 20 20 20 20 20 20 >..Rec0000 < 000090 00 00 00 01 86 18 a1 00 00 00 04 01 10 41 20 20 > . . . . . . . . . . . . . A < 0000a0 20 20 20 20 20 20 20 20 31 20 20 20 20 20 20 20 > 1 < 0000b0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 > < * 000270 20 20 20 20 20 20 20 20 d0 81 0b 0e 00 20 00 18 > ..... ..< 000280 00 00 52 65 63 30 30 31 30 20 20 20 20 20 20 20 >..Rec0010 < 000290 00 00 00 01 86 21 22 00 00 00 08 1b 99 41 20 20 > . . . . . ! " . . . . . . A < 0002a0 20 20 20 20 20 20 20 20 31 20 20 20 20 20 20 20 > 1 < 0002b0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 > < * 000470 20 20 20 20 20 20 20 20 d0 81 0b 0e 00 00 00 20 > ....... < 000480 02 00 52 65 63 30 30 32 30 20 20 20 20 20 20 20 >..Rec0020 < 000490 00 00 00 01 86 18 a1 00 00 00 04 01 3e 41 20 20 > . . . . . . . . . . . . > A < 0004a0 20 20 20 20 20 20 20 20 31 20 20 20 20 20 20 20 > 1 < 0004b0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 > < 3) Purge Garbage Space 4. Purge Garbage Space Page Header • Garbage Pointer => Rec0010 • Garbage Size : 0x200 • Last Insert : 0 • PAGE_N_RECS : 4 Rec0000 • Next Record : Rec0020 Rec0010 • Next Record : Null • Info Flags 0x20UL (Deleted Bit)
  • 23. MySQL Deep Internal © Copyrights 2001~2017 EXEM CO.,LTD. All Rights Reserved. MySQL Deep Internal3) Purge Garbage Space 5. Delete from exem_i.t1 where c1 = 'Rec0020' ; FIL Header • Checksum:0x89dd891a • LSN : 0xf7f37ec Rec0002 • Info Flags 0x20UL (Deleted Bit) FIL Trailer • Checksum : 0x89dd891a • LSN : 0xf7f37ec 000000 89 dd 89 1a 00 00 00 03 ff ff ff ff ff ff ff ff > . . . . . . . . . . . . . . . . < 000010 00 00 00 00 0f 7f 37 ec 45 bf 00 00 00 00 00 00 > . . . . . . 7 . E . . . . . . . < 000020 00 00 00 00 00 e0 00 02 0a 78 80 07 02 82 02 00 > . . . . . . . . . x . . . . . . < 000030 00 00 00 02 00 04 00 04 00 00 00 00 00 00 00 00 > . . . . . . . . . . . . . . . . < 000040 00 00 00 00 00 00 00 00 00 da 00 00 00 e0 00 00 > . . . . . . . . . . . . . . . . < 000050 00 02 00 f2 00 00 00 e0 00 00 00 02 00 32 01 00 > . . . . . . . . . . . . . 2 . . < 000060 02 00 1f 69 6e 66 69 6d 75 6d 00 05 00 0b 00 00 > . . . i n f i m u m . . . . . . < 000070 73 75 70 72 65 6d 75 6d d0 81 0b 0e 00 00 00 10 >supremum........< 000080 04 00 52 65 63 30 30 30 30 20 20 20 20 20 20 20 >..Rec0000 < 000090 00 00 00 01 86 18 a1 00 00 00 04 01 10 41 20 20 > . . . . . . . . . . . . . A < 0000a0 20 20 20 20 20 20 20 20 31 20 20 20 20 20 20 20 > 1 < 0000b0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 > < * 000270 20 20 20 20 20 20 20 20 d0 81 0b 0e 00 20 00 18 > . . . . . . . < 000280 00 00 52 65 63 30 30 31 30 20 20 20 20 20 20 20 >..Rec0010 < 000290 00 00 00 01 86 21 22 00 00 00 08 1b 99 41 20 20 > . . . . . ! " . . . . . . A < 0002a0 20 20 20 20 20 20 20 20 31 20 20 20 20 20 20 20 > 1 < 0002b0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 > < * 000470 20 20 20 20 20 20 20 20 d0 81 0b 0e 00 20 00 20 > ... .. . < 000480 02 00 52 65 63 30 30 32 30 20 20 20 20 20 20 20 >..Rec0020 < 000490 00 00 00 01 86 23 21 00 00 00 0a 29 92 41 20 20 > . . . . . # ! . . . . ) . A < 0004a0 20 20 20 20 20 20 20 20 31 20 20 20 20 20 20 20 > 1 < 003ff0 00 00 00 00 00 70 00 63 89 dd 89 1a 0f 7f 37 ec > . . . . . p . c . . . . . . 7 . <
  • 24. MySQL Deep Internal © Copyrights 2001~2017 EXEM CO.,LTD. All Rights Reserved. MySQL Deep Internal3) Purge Garbage Space 6. Commit ; FIL Header • Checksum :0xba9a2140 • LSN : 0xf7f38b4 FIL Trailer • Checksum :0xba9a2140 • LSN : 0xf7f38b4 000000 ba 9a 21 40 00 00 00 03 ff ff ff ff ff ff ff ff >..!@............< 000010 00 00 00 00 0f 7f 38 b4 45 bf 00 00 00 00 00 00 >......8.E.......< 000020 00 00 00 00 00 e0 00 02 0a 78 80 07 02 82 02 00 >.........x......< 000030 00 00 00 02 00 04 00 04 00 00 00 00 00 00 00 00 >................< 000040 00 00 00 00 00 00 00 00 00 da 00 00 00 e0 00 00 >................< 000050 00 02 00 f2 00 00 00 e0 00 00 00 02 00 32 01 00 >.............2..< 000060 02 00 1f 69 6e 66 69 6d 75 6d 00 05 00 0b 00 00 >...infimum......< 000070 73 75 70 72 65 6d 75 6d d0 81 0b 0e 00 00 00 10 >supremum........< 000080 04 00 52 65 63 30 30 30 30 20 20 20 20 20 20 20 >..Rec0000 < 000090 00 00 00 01 86 18 a1 00 00 00 04 01 10 41 20 20 >.............A < 0000a0 20 20 20 20 20 20 20 20 31 20 20 20 20 20 20 20 > 1 < 0000b0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 > < * 000270 20 20 20 20 20 20 20 20 d0 81 0b 0e 00 20 00 18 > ..... ..< 000280 00 00 52 65 63 30 30 31 30 20 20 20 20 20 20 20 >..Rec0010 < 000290 00 00 00 01 86 21 22 00 00 00 08 1b 99 41 20 20 >.....!"......A < 0002a0 20 20 20 20 20 20 20 20 31 20 20 20 20 20 20 20 > 1 < 0002b0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 > < * 000470 20 20 20 20 20 20 20 20 d0 81 0b 0e 00 20 00 20 > ..... . < 000480 02 00 52 65 63 30 30 32 30 20 20 20 20 20 20 20 >..Rec0020 < 000490 00 00 00 01 86 23 21 00 00 00 0a 29 92 41 20 20 >.....#!....).A < 0004a0 20 20 20 20 20 20 20 20 31 20 20 20 20 20 20 20 > 1 < 0004b0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 > < * 003ff0 00 00 00 00 00 70 00 63 ba 9a 21 40 0f 7f 38 b4 >.....p.c..!@..8.<
  • 25. MySQL Deep Internal © Copyrights 2001~2017 EXEM CO.,LTD. All Rights Reserved. MySQL Deep Internal 000000 ba 9a 21 40 00 00 00 03 ff ff ff ff ff ff ff ff > . . ! @ . . . . . . . . . . . . < 000010 00 00 00 00 0f 7f 38 b4 45 bf 00 00 00 00 00 00 > . . . . . . 8 . E . . . . . . . < 000020 00 00 00 00 00 e0 00 02 0a 78 80 07 04 82 04 00 > . . . . . . . . . x . . . . . . < 000030 00 00 00 02 00 04 00 03 00 00 00 00 00 00 00 00 > . . . . . . . . . . . . . . . . < 000040 00 00 00 00 00 00 00 00 00 da 00 00 00 e0 00 00 > . . . . . . . . . . . . . . . . < 000050 00 02 00 f2 00 00 00 e0 00 00 00 02 00 32 01 00 > . . . . . . . . . . . . . 2 . . < 000060 02 00 1f 69 6e 66 69 6d 75 6d 00 04 00 0b 00 00 >...infimum......< 000070 73 75 70 72 65 6d 75 6d d0 81 0b 0e 00 00 00 10 >supremum........< 000080 06 00 52 65 63 30 30 30 30 20 20 20 20 20 20 20 >..Rec0000 < 000090 00 00 00 01 86 18 a1 00 00 00 04 01 10 41 20 20 > . . . . . . . . . . . . . A < 0000a0 20 20 20 20 20 20 20 20 31 20 20 20 20 20 20 20 > 1 < 0000b0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 > < * 000270 20 20 20 20 20 20 20 20 d0 81 0b 0e 00 20 00 18 > ..... ..< 000280 00 00 52 65 63 30 30 31 30 20 20 20 20 20 20 20 >..Rec0010 < 000290 00 00 00 01 86 21 22 00 00 00 08 1b 99 41 20 20 > . . . . . ! " . . . . . . A < 0002a0 20 20 20 20 20 20 20 20 31 20 20 20 20 20 20 20 > 1 < 0002b0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 > < * 000470 20 20 20 20 20 20 20 20 d0 81 0b 0e 00 20 00 20 > ..... . < 000480 fe 00 52 65 63 30 30 32 30 20 20 20 20 20 20 20 >..Rec0020 < 000490 00 00 00 01 86 23 21 00 00 00 0a 29 92 41 20 20 > . . . . . # ! . . . . ) . A < 0004a0 20 20 20 20 20 20 20 20 31 20 20 20 20 20 20 20 > 1 < 0004b0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 > < * 000670 20 20 20 20 20 20 20 20 d0 81 0b 0e 00 00 00 28 > .......(< 000680 02 00 52 65 63 30 30 33 30 20 20 20 20 20 20 20 >..Rec0030 < 000690 00 00 00 01 86 18 a1 00 00 00 04 01 55 41 20 20 > . . . . . . . . . . . . U A < 0006a0 20 20 20 20 20 20 20 20 31 20 20 20 20 20 20 20 > 1 < 0006b0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 > < 3) Purge Garbage Space Page Header • PAGE_N_RECS : 3 • Garbage Offset : Rec0020 • Garbage Size : 0x400 Rec0000 • Next Record : Rec0030 Rec0020 • Next Record : Rec0010 7. Purge Garbage Space
  • 26. © Copyrights 2001~2017 EXEM CO.,LTD. All Rights Reserved. NAVER http://cafe.naver.com/playexem ITPUB (中) http://blog.itpub.net/31135309/ Wordpress https://playexem.wordpress.com/ Slideshare http://www.slideshare.net/playexem 교육 문의 edu@ex-em.com EXEM Research & Contents Team Youtube https://www.youtube.com/channel/UC5wKR _-A0eL_Pn_EMzoauJg Tudou (中) http://www.tudou.com/home/maxgauge/
  • 27. © Copyrights 2001~2017 EXEM CO.,LTD. All Rights Reserved. 감사합니다