Compare MySQL, when exactly when you need MongoDB (reprint)

Source: Internet
Author: User
Tags dba

You expect a higher write load

by default, compared to transaction security, MongoDB pay more attention to the high insertion speed. If you need to load a lot of low-value business data, MongoDB will be a good fit for your use case. But you must avoid using MongoDB in scenarios where high transaction security is required , such as a $ Million deal.

Unreliable environments guarantee high availability

set the replica set (Master - from the server settings) is not only convenient and fast, in addition, the use MongoDB nodes (or data center) failover can also be implemented quickly, safely, and automatically.

There's going to be a big scale in the future.

database expansion is very challenging when the single table size reaches 5-10GB when the MySQL There is no doubt that table performance will degrade. If you need to Shard and split your database,MongoDB will easily achieve this.

Using location-based data queries

MongoDB supports two-dimensional spatial indexing so that data can be obtained quickly and accurately from a specified location.

The explosion of unstructured data grows

GiveRDBMSincreasing the column in some cases may lock the entire database, or increase the load resulting in performance degradation, which usually occurs when the table is larger than1GB(It is also mentioned belowBillrunpain points in the system--a single tableGB) in the case. In viewMongoDBThe weak data structure pattern, adding1new fields will not have any effect on the old table, the whole process is very fast, so when the application changes, you don't need a dedicated1aDBAto modify the database schema.

Lack of professional database administrator

If you don't have a professional DBA , and you don't need to structure your data and do Join queries, MongoDB will be your first choice. MongoDB is well suited for class persistence, and classes can be serialized into JSON and stored in mongodb. It is important to note that if you are looking for a larger scale, you must understand some of the best practices to avoid getting into the wrong way.

Personal Understanding:

If the write load and single table are too large, the solution is to scale out through sharding, in fact, MySQL is also supported. That's not a reason.

The scenario in which I can use MongoDB is that you don't need too many transactions and multiple table associations, so using MongoDB can make for a greater performance boost. or Schema-free usage scenarios.

Compare MySQL, when exactly when you need MongoDB (reprint)

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.