Compare the performance of MongoDB and SQL Server 2008
In the following article, we will point out the difference in performance of the relatively new database management system, which is MongoDB and one of the popular systems like SQL Server (MySQL or Oracle). Most of the data is given here in the form of charts, so we can easily imagine the advantages and disadvantages of MongoDB as well as other database management systems.
TipsMake.com - In the article below, we will point out the difference in performance of the relatively new database management system, which is MongoDB and one of the popular systems like SQL Server (MySQL or Oracle). Most of the data is given here in the form of charts, so we can easily imagine the advantages and disadvantages of MongoDB as well as other database management systems.
The chart is controversial about MongoDB inserting data more than 100 times faster than SQL Server
Imagine that you are establishing a system of online payment websites, which involves many different data units. If there is a database management system that operates faster than SQL Server many times, free of charge, it is easy to monitor and handle, your entire application system with LINQ (translated as query language Integrated into programming languages, MongoDB will certainly be a better choice.
And when there is such a database management system, we can deploy and operate on most of today's popular hardware devices, rather than high-end and dedicated server devices. It means that there is no need to buy or rent servers as before, and of course the initial cost must be much lower, while the profit or revenue is almost unchanged.
Another factor before we went into testing, member Kristina Chodorow from 10Gen organized a MySQL seminar in San Francisco with the Dropping ACID with MongoDB topic.
Here, Kristina has described quite specifically about SourceForge 's deployment experience in moving databases from MySql to MongoDB . On MySql platform, SourceForge has reached the limit of performance with a certain number of users. But with some changes in MongoDB options, the system has become much more stable.
Test model:
An intensive database model for online applications is enhanced to improve the ability to support as many users as possible. There will be many user accounts from online web applications, from API functions and many other related applications. Technically, users will interact directly with data by executing query statements, each of which corresponds to small pieces of data throughout the system. However, reality and theory are completely different, the above model is just what we are imagining.
Compare Insert function:
This is the most obvious difference between MongoDB and SQL Server :
This process is done by inserting 50,000 independent objects using NoRM of MongoDB and LINQ to SQL for SQL Server 2008 . The sample model is as follows:
MongoDB
SQL Server
Then, run 5 client applications into the database with the insert function:
MongoDB
SQL Server
And look closely at the most important piece of information shown here, which is the execution time:
MongoDB
SQL Server
Easy, you can see the difference between 2 seconds - MongoDB and 205 seconds - SQL Server. To ensure the authenticity of the results, we re-implemented the program based on ADO.NET, and the speed of SQL was raised to about 1.5 to 3 times the previous one. Making a simple calculation, MongoDB is still about 30-50 times faster than SQL.
Query speed comparison:
Next, we move on to the process of separating data from the same object in the ID field of each record:
Looking at the chart above, it is clear that MongoDB still outperforms SQL in terms of performance (about 3 times). To continue, let's standardize a slightly more complex data table with foreign keys - Foreign Key and join:
MongoDB
SQL Server
The results shown here are similar to previous tests without having to join:
All tests are done on Lenovo T61 laptop, 64-bit Windows 7 operating system with 2.8 GHz processor, using 64 bit version of SQL Server 2008 Standard and MongoDB. The entire sample you can download via MediaFire.
You should read it
- What is MS SQL Server?
- MongoDB malicious code attacks more than 26,000 victims in a week
- Learn about security features and authentication in MongoDB
- How to Build a GraphQL API with Apollo Server and MongoDB
- Reference Database in MongoDB
- How to recover the database in MS SQL Server
- Advantages of MongoDB
- Create Database in MongoDB
- SQL Server 2008 SP2 has new SharePoint integrations
- How to install SQL Server database
- Create Backup in MongoDB
- A serious vulnerability on phpMyAdmin allows an attacker to destroy the database
Maybe you are interested
How to create ringtones from Zing MP3 Android How to change the color of the message frame on iPhone / iPad How to transform the message interface on iPhone 11 amazing benefits of coffee make you irresistible 10 great benefits of Matcha green tea you may not know yet Explore Saturn's belt - the most beautiful wonder of the solar system