Mysql NDB and InnoDB 存储引擎区别

来源:互联网 发布:网络接口怎么接线 编辑:程序博客网 时间:2024/06/15 05:10

NDB存储引擎使用一个分布式的实现,无共享架构,这使它在许多方面的行为不同于InnoDB。对于那些不习惯使用NDB,由于事务、外键、表限制,其分布式性质可能会导致意外行为。这些在下表中显示:


Feature

InnoDB 1.1

NDB 7.5

MySQL Server Version

5.7

5.7

InnoDB Version

InnoDB 5.7.20

InnoDB 5.7.20

NDB Cluster Version

N/A

NDB 7.5.8

Storage Limits

64TB

128TB (as of NDB 7.5.2)

Foreign Keys

Yes

Yes

Transactions

All standard types

READ COMMITTED

MVCC

Yes

No

Data Compression

Yes

No (NDB checkpoint and backup files can be compressed)

Large Row Support (> 14K)

Supported for VARBINARYVARCHAR,BLOB, and TEXT columns

Supported for BLOB and TEXT columns 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