mysql存储引擎InnoDB 1.1、NDB 7.5对比
官网针对NDB和InnoDB进行了多方位的对比:
Differences Between the NDB and InnoDB Storage Engines
https://dev.mysql.com/doc/refman/5.7/en/mysql-cluster-ndb-innodb-engines.html
The NDB
storage engine is implemented using a distributed, shared-nothing architecture, which causes it to behave differently from InnoDB
in a number of ways. For those unaccustomed to working with NDB
, unexpected behaviors can arise due to its distributed nature with regard to transactions, foreign keys, table limits, and other characteristics. These are shown in the following table:
Feature | | |
---|---|---|
MySQL Server Version | 5.7 | 5.7 |
| | |
NDB Cluster Version | N/A | |
Storage Limits | 64TB | 128TB (as of NDB 7.5.2) |
Foreign Keys | Yes | Yes |
Transactions | All standard types | |
MVCC | Yes | No |
Data Compression | Yes | No (NDB checkpoint and backup files can be compressed) |
Large Row Support (> 14K) | Supported for | |
Replication Support | Asynchronous and semisynchronous replication using MySQL Replication | Automatic synchronous replication within an NDB Cluster; asynchronous replication between NDB Clusters, using MySQL Replication |
Scaleout for Read Operations | Yes (MySQL Replication) | Yes (Automatic partitioning in NDB Cluster; NDB Cluster Replication) |
Scaleout for Write Operations | Requires application-level partitioning (sharding) | Yes (Automatic partitioning in NDB Cluster is transparent to applications) |
High Availability (HA) | Requires additional software | Yes (Designed for 99.999% uptime) |
Node Failure Recovery and Failover | Requires additional software | Automatic (Key element in NDB architecture) |
Time for Node Failure Recovery | 30 seconds or longer | Typically < 1 second |
Real-Time Performance | No | Yes |
In-Memory Tables | No | Yes (Some data can optionally be stored on disk; both in-memory and disk data storage are durable) |
NoSQL Access to Storage Engine | Yes | Yes (Multiple APIs, including Memcached, Node.js/JavaScript, Java, JPA, C++, and HTTP/REST) |
Concurrent and Parallel Writes | Not supported | Up to 48 writers, optimized for concurrent writes |
Conflict Detection and Resolution (Multiple Replication Masters) | No | Yes |
Hash Indexes | No | Yes |
Online Addition of Nodes | Read-only replicas using MySQL Replication | Yes (all node types) |
Online Upgrades | No | Yes |
Online Schema Modifications | Yes, as part of MySQL 5.7 | Yes |
NDB and InnoDB Workloads
https://dev.mysql.com/doc/refman/5.7/en/mysql-cluster-ndb-innodb-workloads.html
NDB Cluster has a range of unique attributes that make it ideal to serve applications requiring high availability, fast failover, high throughput, and low latency. Due to its distributed architecture and multi-node implementation, NDB Cluster also has specific constraints that may keep some workloads from performing well. A number of major differences in behavior between the NDB
and InnoDB
storage engines with regard to some common types of database-driven application workloads are shown in the following table::
Workload | NDB Cluster ( | |
---|---|---|
High-Volume OLTP Applications | Yes | Yes |
DSS Applications (data marts, analytics) | Yes | Limited (Join operations across OLTP datasets not exceeding 3TB in size) |
Custom Applications | Yes | Yes |
Packaged Applications | Yes | Limited (should be mostly primary key access) NDB Cluster 7.5 supports foreign keys |
In-Network Telecoms Applications (HLR, HSS, SDP) | No | Yes |
Session Management and Caching | Yes | Yes |
E-Commerce Applications | Yes | Yes |
User Profile Management, AAA Protocol | Yes | Yes |
NDB and InnoDB Feature Usage Summary
https://dev.mysql.com/doc/refman/5.7/en/mysql-cluster-ndb-innodb-usage.html
When comparing application feature requirements to the capabilities of InnoDB
with NDB
, some are clearly more compatible with one storage engine than the other.
The following table lists supported application features according to the storage engine to which each feature is typically better suited.
Preferred application requirements for | Preferred application requirements for |
---|---|
|
|
参考资料:
https://dev.mysql.com/doc/refman/5.7/en/mysql-innodb-cluster-userguide.html
https://dev.mysql.com/doc/refman/5.7/en/mysql-innodb-cluster-introduction.html
https://dev.mysql.com/doc/refman/5.7/en/mysql-cluster-compared.html
https://dev.mysql.com/doc/refman/5.7/en/mysql-cluster-ndb-innodb-engines.html
https://dev.mysql.com/doc/refman/5.7/en/mysql-cluster-ndb-innodb-workloads.html
https://dev.mysql.com/doc/refman/5.7/en/mysql-cluster-ndb-innodb-usage.html