Research on MongoDB query performance

Previous: Mongodb VS Mysql query performance, tested the query performance of mongodb and mysql. Result Description mongodb The performance is OK, and it can be used instead of mysql. But this test is at the million level, and my scene is at the KW level. So it is necessary to test the effect of mongodb at the kw level. My test environment is 4G memory (a lot of memory is occupied by other programs), 2kw data, and the query randomly generates ids (query 20 ids at a time). The test in such an environment is not ideal, and it is disappointing. The average query time is 500ms (compared to mysql Not bad, especially under concurrent queries, the performance is poor. very low throughput). View its index size (query with db.mycoll.stats()): 2kw There are about 1.1G indexes in the data, and the stored data is about 11G. During the test, it was found that iowait accounts for about 50%, which seems to be the bottleneck of io. Also see mongodb Not much memory used (less than the size of the index, it seems the machine is not big enough to test). Change to a machine with available 6G memory. Under 50…

Contact Us

Contact us

181-3619-1160

Online consultation: QQ交谈

E-mail: [email protected]

Working hours: Monday to Friday, 9:00-17:30, holidays off

Follow wechat
Scan wechat and follow us

Scan wechat and follow us

Follow Weibo
Back to top
首页
微信
电话
搜索