Skip to main content
Bumped by Community user
Bumped by Community user
Bumped by Community user

I wrote code that inserts about 15 millions rows into tables in MyISAM and InnoDB for comparsion. 

MyISAM and InnoDB are set up with no optimization configuration in /etc/mysql/my.cnf. 

And tables are created with no indexes. 

Insertion are done using statements like "INSERT INTO Table (columnA, columnB, columnC) VALUES (?, ?, ?)..." (10,000 (?, ?, ?)s) and db.Exec(stmt, valueArgs...)

INSERT INTO Table (columnA, columnB, columnC) VALUES (?, ?, ?)..." 
(10,000 (?, ?, ?)s) 

db.Exec(stmt, valueArgs...)

with valueArgsvalueArgs being the actual "VALUES." ItVALUES It is widely believed that MyISAM is faster than InnoDB in insertion. 

Baron Schwartz, author of the book High Performance MySQL, explained why in this post Mysql: Insert performance INNODB vs MYISAM. 

However, in my experiment, I found out that InnoDB is actually faster than MyISAM. Could anyone give me some insights?

mysql  Ver 14.14 Distrib 5.7.30, for Linux (x86_64) using  EditLine wrapper

I wrote code that inserts about 15 millions rows into tables in MyISAM and InnoDB for comparsion. MyISAM and InnoDB are set up with no optimization configuration in /etc/mysql/my.cnf. And tables are created with no indexes. Insertion are done using statements like "INSERT INTO Table (columnA, columnB, columnC) VALUES (?, ?, ?)..." (10,000 (?, ?, ?)s) and db.Exec(stmt, valueArgs...) with valueArgs being the actual "VALUES." It is widely believed that MyISAM is faster than InnoDB in insertion. Baron Schwartz, author of the book High Performance MySQL, explained why in this post Mysql: Insert performance INNODB vs MYISAM. However, in my experiment, I found out that InnoDB is actually faster than MyISAM. Could anyone give me some insights?

mysql  Ver 14.14 Distrib 5.7.30, for Linux (x86_64) using  EditLine wrapper

I wrote code that inserts about 15 millions rows into tables in MyISAM and InnoDB for comparsion. 

MyISAM and InnoDB are set up with no optimization configuration in /etc/mysql/my.cnf. 

And tables are created with no indexes. 

Insertion are done using statements like

INSERT INTO Table (columnA, columnB, columnC) VALUES (?, ?, ?)..." 
(10,000 (?, ?, ?)s) 

db.Exec(stmt, valueArgs...)

with valueArgs being the actual VALUES It is widely believed that MyISAM is faster than InnoDB in insertion. 

Baron Schwartz, author of the book High Performance MySQL, explained why in this post Mysql: Insert performance INNODB vs MYISAM. 

However, in my experiment, I found out that InnoDB is actually faster than MyISAM. Could anyone give me some insights?

mysql  Ver 14.14 Distrib 5.7.30, for Linux (x86_64) using  EditLine wrapper
Source Link
Bruce
  • 121
  • 2

MySQL InnoDB Insertion Faster Than MyISAM

I wrote code that inserts about 15 millions rows into tables in MyISAM and InnoDB for comparsion. MyISAM and InnoDB are set up with no optimization configuration in /etc/mysql/my.cnf. And tables are created with no indexes. Insertion are done using statements like "INSERT INTO Table (columnA, columnB, columnC) VALUES (?, ?, ?)..." (10,000 (?, ?, ?)s) and db.Exec(stmt, valueArgs...) with valueArgs being the actual "VALUES." It is widely believed that MyISAM is faster than InnoDB in insertion. Baron Schwartz, author of the book High Performance MySQL, explained why in this post Mysql: Insert performance INNODB vs MYISAM. However, in my experiment, I found out that InnoDB is actually faster than MyISAM. Could anyone give me some insights?

mysql  Ver 14.14 Distrib 5.7.30, for Linux (x86_64) using  EditLine wrapper