Get the App
SLTechnology News&Howtos  ›  Database  › 

Differences and implementation of sharding, partitioning and replication (mongodb, mysql)

Shulou Source: shulou.com Published: 2022-06-01 07:29:08 10月03日 Update

The difference between sharding and partitioning:

a. Sharding: solve the problem of insufficient physical disk space (if indexed, you can also optimize the query to achieve the function of partitioning)

b. Zoning:

Optimize the query to prevent the query from being slow due to too much data in a table

c. Copy:

Prevent the loss caused by the database crash and ensure the highly available fragmentation of the database:

A. Mongodb:sharding

B. Mysql:

Mysql-cluster partition implementation:

A. mongodb: there is no concept of sub-tables, sharding can be used instead of sub-tables (because sharding has its own indexing function)

B. Mysql:

Partition replication implementation:

A. Mongodb:master master slave slave

B. Mysql:

Master master slave slave

Tags: A. data b. query table function database index slowness loss concept physics disk space excess problem c. guarantee Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno NVidia Xiaomi vpn OPPO Reno Huawei