当前位置:网站首页>Why is mongodb fast
Why is mongodb fast
2022-07-26 04:27:00 【miaoao611】
Write operations
1) Write operations MongoDB The fundamental reason why it is faster than traditional databases is Mongo Memory mapping technology used , When writing data, it can be returned to the application as long as it is completed in memory , In this way, the concurrency is naturally high . The operation of saving to the hardware is completed asynchronously in the background . Be careful MongoDB stay 2.4 It is already written safely by default ( The specific implementation is in the driver ).Read operations
Read operations MongoDB The reason for the speed is :
1)MongoDB The design requires your usual data (working set) You can put it in memory . In this way, most operations only need to read memory , Nature soon .
2) Document pattern design generally means that the data you need are relatively concentrated ( Memory or hard disk ), As we all know, the most time-consuming hard disk reading and writing is the head positioning time generated by random reading and writing , Data aggregation reduces the need for relational databases to find data from all over the world ( then Join) Random reading time spent ; The other is Mongo It is a distributed cluster, so it can expand in parallel . At present, the general concurrency of millions of times is achieved simultaneously through clusters of dozens or hundreds of nodes . This point MySQL Basically can't do .NoSQL Not without sql, Just don't use relationships . It doesn't matter , It means that each data is like having a separate storage space , Then an aggregate index points to . Search performance will certainly improve .
3) Language . Use javascript Syntax is more efficient 、 direct . These are MongoDB The reason for the high efficiency of relational databases . But you can't just focus on efficiency , There are also some disadvantages brought by the design of this kind of database . For example, the maintenance of data relations will bring a lot of redundant data 、 The client code needs a lot of work for the database IO operation 、 Data mining is difficult to realize, etc .
边栏推荐
- 数据仓库
- How to make your language academic when writing a thesis? Just remember four sentences!
- 支持代理直连Oracle数据库,JumpServer堡垒机v2.24.0发布
- 吴恩达机器学习课后习题——逻辑回归
- 1. Mx6u-alpha development board (main frequency and clock configuration experiment)
- Swiftui one day crash
- Credit card fraud detection based on machine learning
- [learning notes] agc041
- How to download the supplementary literature?
- Acwing刷题
猜你喜欢

Segger embedded studio cannot find xxx.c or xxx.h file

第三篇如何使用SourceTree提交代码

Optimization analysis and efficiency execution of MySQL

p-范数(2-范数 即 欧几里得范数)

How to download the supplementary literature?

Use Baidu PaddlePaddle easydl to complete garbage classification

egg-ts-sequelize-CLI

生活相关——十年的职业历程(转)

Steam science education endows classroom teaching with creativity

VM virtual machine has no un bridged host network adapter, unable to restore the default configuration
随机推荐
再获认可 | 赛宁网安连续上榜《CCSIP 2022中国网络安全产业全景图》
How to write abstract in English thesis?
Soft simulation rasterization renderer
Optimization analysis and efficiency execution of MySQL
吴恩达机器学习课后习题——线性回归
Sweet butter
Comprehensive evaluation and decision-making method
Spark Structured Streaming HelloWorld
理性认知教育机器人寓教于乐的辅助作用
How to make your language academic when writing a thesis? Just remember four sentences!
p-范数(2-范数 即 欧几里得范数)
香甜的黄油
Web Test Method Encyclopedia
MySQL log classification: error log, binary log, query log, slow query log
支持代理直连Oracle数据库,JumpServer堡垒机v2.24.0发布
Recommendation Book Educational Psychology: a book for tomorrow's teachers~
Unable to find sygwin.s file during vscode debugging
Comparison of the relationship between the number of partitions and the number of reducetask in MapReduce
Sangi diagram of machine learning (for user behavior analysis)
解决:RuntimeError: Expected object of scalar type Int but got scalar type Double