原创作品,允许转载,转载时请务必以超链接形式标明文章
原始出处 、作者信息和本声明。否则将追究法律责任。
http://suifu.blog.51cto.com/9167728/1856837
1
2
3
4
5
6
|
innodb_undo_directory=
/data/undolog
innodb_undo_tablespaces=4
innodb_undo_logs=128
innodb_max_undo_log_size=1G
innodb_purge_rseg_truncate_frequency
innodb_undo_log_truncate=1
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
mysql> show variables
like
'innodb_undo%'
;
+
--------------------------+---------------+
| Variable_name | Value |
+
--------------------------+---------------+
| innodb_undo_directory | /data/undolog |
| innodb_undo_log_truncate |
ON
|
| innodb_undo_logs | 128 |
| innodb_undo_tablespaces | 4 |
+
--------------------------+---------------+
4
rows
in
set
(0.00 sec)
mysql>
update
helei
set
c1=1;
Query OK, 1000000
rows
affected (45.48 sec)
Rows
matched: 1000000 Changed: 1000000 Warnings: 0
mysql>
update
helei
set
c2=222;
Query OK, 1000000
rows
affected (43.25 sec)
Rows
matched: 1000000 Changed: 1000000 Warnings: 0
mysql>
update
helei
set
c4=
'heleiheleiheleiheleihel'
;
Query OK, 1000000
rows
affected (10.28 sec)
Rows
matched: 1000000 Changed: 1000000 Warnings: 0
|
1
2
3
4
5
6
7
8
|
2016-09-26T23:51:06.062828Z 0 [Note] InnoDB: Truncating UNDO tablespace with space identifier 1
2016-09-26T23:51:06.159077Z 0 [Note] InnoDB: Completed truncate of UNDO tablespace with space identifier 1
2016-09-26T23:51:06.159101Z 0 [Note] InnoDB: Truncating UNDO tablespace with space identifier 2
2016-09-26T23:51:06.242355Z 0 [Note] InnoDB: Completed truncate of UNDO tablespace with space identifier 2
2016-09-26T23:51:06.242378Z 0 [Note] InnoDB: Truncating UNDO tablespace with space identifier 3
2016-09-26T23:51:06.313036Z 0 [Note] InnoDB: Completed truncate of UNDO tablespace with space identifier 3
2016-09-26T23:51:06.313060Z 0 [Note] InnoDB: Truncating UNDO tablespace with space identifier 4
2016-09-26T23:51:06.403003Z 0 [Note] InnoDB: Completed truncate of UNDO tablespace with space identifier 4
|