启用 redo log load data
mysql [localhost:8021] {msandbox} (test) > ALTER INSTANCE ENABLE INNODB REDO_LOG;
Query OK, 0 rows affected (0.09 sec)
mysql [localhost:8021] {msandbox} (test) > set global sync_binlog=1;set global innodb_flush_log_at_trx_commit=1;
Query OK, 0 rows affected (0.00 sec)
Query OK, 0 rows affected (0.00 sec)
mysql [localhost:8021] {msandbox} (test) > load data infile 'sbtest.txt' into table sbtest1;
Query OK, 10000000 rows affected (3 min 37.55 sec)
Records: 10000000 Deleted: 0 Skipped: 0 Warnings: 0
mysql [localhost:8021] {msandbox} (test) > set global sync_binlog=0;set global innodb_flush_log_at_trx_commit=0;
Query OK, 0 rows affected (0.00 sec)
Query OK, 0 rows affected (0.00 sec)
mysql [localhost:8021] {msandbox} (test) > truncate sbtest1;
Query OK, 0 rows affected (0.34 sec)
mysql [localhost:8021] {msandbox} (test) > load data infile 'sbtest.txt' into table sbtest1;
Query OK, 10000000 rows affected (2 min 49.84 sec)
Records: 10000000 Deleted: 0 Skipped: 0 Warnings: 0