# Inserting many rows (more then 10000rows/s)

**URL:** <https://forums.percona.com/t/inserting-many-rows-more-then-10000rows-s/146>\
**Category:** Other MySQL® Questions\
**Created:** [December 15, 2006, 7:59am UTC](https://forums.percona.com/t/inserting-many-rows-more-then-10000rows-s/146 "2006-12-15T07:59:16Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![nejman](https://avatars.discourse-cdn.com/v4/letter/n/ac8455/32.png) [@nejman](https://forums.percona.com/u/nejman)\
**Post date:** [December 15, 2006, 7:59am UTC](https://forums.percona.com/t/inserting-many-rows-more-then-10000rows-s/146/1 "2006-12-15T07:59:16Z")

</div>

Hello,  
I created application that continuosly store about 10000 rows/sec. Each row has fixed length (12xinteger). I don’t use  
indexes. My server load is about 1.6  
(2xIntel Xeon CPU 3.20GHz, 2GB RAM, SCSI disks). Application rotate tables every hour (start storing to the new table). Old tables are removed. I have performance problem with this type of application.  
Now, I’m using prepared statement with multivalues delayed inserts  
(about 2000 values per 1 insert). If I compared prepared statement and full insert query it is almost same. Can you suggest me some tips, how better/quickly store many rows?

My MySQL configuration:  
key\_buffer = 550M  
bulk\_insert\_buffer\_size = 32M  
max\_allowed\_packet = 16M  
table\_cache = 2048  
sort\_buffer = 32M  
record\_buffer = 16M  
read\_buffer = 16M  
read\_rnd\_buffer = 16M  
tmp\_table\_size = 150M  
max\_heap\_table\_size = 150M

I’m not using log or log-bin…

Many thanks,  
Jan

---

<div class="post-metadata">

**Author:** ![garyis](https://avatars.discourse-cdn.com/v4/letter/g/c5a1d2/32.png) [@garyis](https://forums.percona.com/u/garyis)\
**Post date:** [December 16, 2006, 9:29pm UTC](https://forums.percona.com/t/inserting-many-rows-more-then-10000rows-s/146/2 "2006-12-16T21:29:35Z")

</div>

with high amount of inserts/sec youĺl be limited by the disc I/O speed, this will also cause load to increase.

Setting innodb\_flush\_method to O\_DIRECT made a big difference to me plus you could also try innodb\_flush\_log\_at\_trx\_commit=0
