Forum Moderators: bakedjake

Message Too Old, No Replies

mysql insert speed

how to speed up insert to table.

         

vlad4

3:56 pm on Mar 16, 2005 (gmt 0)



Hi, I have table in mysql database with hundreds of selects per second.Once in 15 minutes there is insert yo this table.The problem is that this single insert take a lot of time about 1 sec.I tryied to play with mysql variables but without succses.
I did test and inserted to table with same structure without selects and it take 0.01 sec.
How can I solve this problem?
Thanks.

MattyMoose

6:05 pm on Mar 16, 2005 (gmt 0)

10+ Year Member



I don't think there's much you can do about it other than to decrease the load on the server. Adding hardware, load balancing, or possibly even redesigning the DB so that there are less selects on a single table, but spli up among more tables.

Basically your problem is 100 selects a second, and there's not much that you can do to tune it (IMHO) without throwing some hardware at it.

martin

10:33 am on Mar 22, 2005 (gmt 0)

10+ Year Member



You can try InnoDB tables which have row level locking instead of table level. Generally they have better update/insert performance compared to MyISAM tables which are better at selects. You also might want to upgrade to the latest stable version of the MySQL server, I've seen noticable performance differences when upgrading some old versions.