Test insert 10000 data, why is slower than the Innodb MyIsam insert, MyIsam with 10 s, Innodb use 1 s,
Insert the script is as follows:
The BEGIN
Set the session the autocommit=0;
Truncate table t1;
The set @ starttime=unix_timestamp (current_timestamp ());
The set @ I=0;
The set @ num=10000;
While @ i<@ num do
Insert into t1 values (id1, id2, content) (@ I, @ I, "aaa");
The set @ I=@ I + 1;
End the while;
commit;
The set @ endime=unix_timestamp (current_timestamp ());
Select @ endime - @ starttime;
END
Table id1, id2, three fields, the content of two int, a varchar, it is very strange
CodePudding user response:
Is it because of compressionCodePudding user response:
MyIsam is suitable for the scene, to read more writing less generally use InnoDBCodePudding user response:
MyISM data structure, and the Innodb data interface, the structure is different also,CodePudding user response:
Find the problem, can turn off the binlog, MyIsam binlog writing is much bigger than the InnodbCodePudding user response:
Well, well,Innodb support transaction myisam doesn't support the
5.7 after the default data engine is innodb,
To choose according to your actual scene,
Why do you use scenario need myisam?
CodePudding user response: