n******e 发帖数: 50 | 1 Sorry can not input chinese now.
I use mysql in my program. I need to update the status of
the rows and add new rows very frequently: 20updates and
20*20additions per second. Now the bottle neck of the whole
program is the database: I can only reach to no more than
10updates and 10*10 additions per second. Can anybody give
me some tips to speed it up? My program is written in C,
I use the .h and lib files provided in mysql package. I
access the database in a similar way as a client program.
The | a*****e 发帖数: 1700 | 2 Sorry, but you have reached the bottleneck of most DBMS. MySQL
is one of the fastest, but I guess if you really want to
get around with it, you have to modify the way you code your
program. I remebered seeing somewhere MySQL has a low level
locking mechanism, you can use it instead of normal locking
occurred in "insert" and "update". Or you can get rid of the
locking completely if you program is single thread and you
want to take the risk. It will really speed up the whole thing.
I am sorry I ca
【在 n******e 的大作中提到】 : Sorry can not input chinese now. : I use mysql in my program. I need to update the status of : the rows and add new rows very frequently: 20updates and : 20*20additions per second. Now the bottle neck of the whole : program is the database: I can only reach to no more than : 10updates and 10*10 additions per second. Can anybody give : me some tips to speed it up? My program is written in C, : I use the .h and lib files provided in mysql package. I : access the database in a similar way as a client program. : The
|
|