mysql存储引擎InnoDB 1.1、NDB 7.5对比
官网针对NDB和InnoDB进行了多方位的对比:
TheNDBstorage engine is implemented using a distributed, shared-nothing architecture, which causes it to behave differently fromInnoDBin a number of ways. For those unaccustomed to working withNDB, 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
InnoDB1.1
NDB7.5
MySQL Server Version
5.7
5.7
InnoDBVersion
InnoDB5.7.20
InnoDB5.7.20
NDB Cluster Version
N/A
NDB7.5.8
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 forVARBINARY,VARCHAR,BLOB, andTEXTcolumns
Supported forBLOBandTEXTcolumns only (Using these types to store very large amounts of data can lower NDB performance)
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 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 theNDBandInnoDBstorage engines with regard to some common types of database-driven application workloads are shown in the following table::
Workload
NDB Cluster (NDB)
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
When comparing application feature requirements to the capabilities ofInnoDBwithNDB, 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 forInnoDB
Preferred application requirements forNDB
Foreign keys
Note
NDB Cluster 7.5 supports foreign keys
Full table scans
Very large databases, rows, or transactions
Transactions other thanREAD COMMITTED
Write scaling
99.999% uptime
Online addition of nodes and online schema operations
Real-time performance
Limited use ofBLOBcolumns
Foreign keys are supported, although their use may have an impact on performance at high throughput
参考资料: