???????blog??InnoDB select????????????????InnoDB select???????????blog??insert?????????????Щ????о????????????????°?!

????1??????my.cnf????????£?

????innodb_file_per_table = 0

????innodb_flush_log_at_trx_commit = 2

????innodb_buffer_pool_size = 8G

????innodb_file_io_threads = 4

??????????????????mysqld

????2????test????????

????CREATE TABLE `test` (

????`ID` bigint(20) NOT NULL auto_increment??

????`INT_A` int(11) default NULL??

????`INT_B` int(11) default NULL??

????`INT_C` int(11) default NULL??

????`STRING_A` varchar(50) default NULL??

????`STRING_B` varchar(250) default NULL??

????`STRING_C` varchar(700) default NULL??

????PRIMARY KEY (`ID`)??

????KEY `IDX_TEST_IA` (`INT_A`)??

????KEY `IDX_TEST_IB` (`INT_B`)??

????KEY `IDX_TEST_SA` (`STRING_A`??`INT_C`)

????) ENGINE=InnoDB DEFAULT CHARSET=gbk

????3??50???????????????????SQL 80??Σ?

????insert into test(INT_A?? INT_B?? INT_C?? STRING_A?? STRING_B?? STRING_C) values(CEIL(RAND()*100000)?? CEIL(RAND()*100000)?? CEIL(RAND()*100000)?? random_string(CEIL(50*RAND()))?? random_string(CEIL(250*RAND()))?? random_string(CEIL(700*RAND())))

??????????????????????4000????????????InnoDB??insertЧ?????????????????г??????????????????blog?У?????????????????“???????????????????????????????MySQL?????????????????????”?????????????????????InnoDB???buffer?????8G??buffer?????8G???????cache??????????????????!????????????μ??????????顣

????1??truncate table test

????2??????my.cnf????????£?

????innodb_file_per_table = 0

????innodb_flush_log_at_trx_commit = 2

????innodb_flush_method = O_DIRECT

????innodb_buffer_pool_size = 500M

????innodb_file_io_threads = 4

??????????????????mysqld