avatar
n*e
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
avatar
a*e
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

相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。