|
TOP
|
|
mysql存储引擎memory,ndb,innodb之选择(二)
|
DB
|
| Foreignkeys Note MySQLCluster NDB 7.3 supports foreign keys. Fulltable scans Verylarge databases, rows, or transactions Transactionsother thanREADCOMMITTED |
Writescaling 99.999%uptime Onlineaddition of nodes and online schema operations MultipleSQL and NoSQL APIs (seeMySQLCluster APIs: Overview and Concepts) Real-timeperformance Limiteduse ofBLOBcolumns Foreignkeys are supported, although their use may have an impact onperformance at high throughput |
2
如何选择memory存储引擎或mysql cluster: When to Use MEMORY or MySQL Cluster. Developers looking to deploy applications that use the MEMORY storage engine for important, highly available, or frequently updated data should consider whether MySQL Cluster is a better choice. A typical use case for the MEMORY engine involves these characteristics: ? Operations involving transient, non-critical data such as session management or caching. When the MySQL server halts or restarts, the data in MEMORY tables is lost. ? In-memory storage for fast access and low latency. Data volume can fit entirely in memory without causing the operating system to swap out virtual memory pages. ? A read-only or read-mostly data access pattern (limited updates). MySQL Cluster offers the same features as the MEMORY engine with higher performance levels, and provides additional features not available with MEMORY: ? Row-level locking and multiple-thread operation for low contention between clients. ? Scalability even with statement mixes that include writes. ? Optional disk-backed operation for data durability. ? Shared-nothing architecture and multiple-host operation with no single point of failure, enabling 99.999% availability. ? Automatic data distribution across nodes; application developers need not craft custom sharding or partitioning solutions. ? Support for variable-length data types (including BLOB and TEXT) not supported by MEMORY. MEMORY存储引擎和MySQL Cluster的更多细节对比参见白皮书《Scaling Web Services with MySQL Cluster: An Alternative to the MySQL Memory Storage Engine》 ?
Table 15.4 MEMORYStorage Engine Features
| Storagelimits |
RAM |
Transactions |
No |
Lockinggranularity |
Table |
| MVCC |
No |
Geospatialdata type support |
No |
Geospatialindexing support |
No |
| B-treeindexes |
Yes |
T-treeindexes |
No |
Hashindexes |
Yes |
| Full-textsearch indexes |
No |
Clusteredindexes |
No |
Datacaches |
N/A |
| Indexcaches |
N/A |
Compresseddata |
No |
Encrypteddata[a] |
Yes |
| Clusterdatabase support |
No |
Replicationsupport[b] |
Yes |
Foreignkey support |
No |
| Backup/ point-in-time recovery[c] |
Yes |
Querycache support |
Yes |
Updatestatistics for data dictionary |
Yes |
| [a]Implemented in the server (via encryption functions), ratherthan in the storage engine. [b]Implemented in the server, rather than in the storage engine. [c]Implemented in the server, rather than in the storage engine. |
3
myisam, memory, ndb, archive, innodb存储引擎功能汇总:
Table 15.1 StorageEngines Feature Summary
| Feature |
MyISAM |
Memory |
InnoDB |
Archive |
NDB |
| Storagelimits |
256TB |
RAM |
64TB |
None |
384EB |
| Transactions |
No |
No |
Yes |
No |
Yes |
| Lockinggranularity |
Table |
Table |
Row |
Table |
Row |
| MVCC |
No |
No |
Yes |
No |
No |
| Geospatialdata type support |
Yes |
No |
Yes |
Yes |
Yes |
| Geospatialindexing support |
Yes |
No |
Yes[a] |
No |
No |
| B-treeindexes |
Yes |
Yes |
Yes |
No |
No |
| T-treeindexes |
No |
No |
No |
No |
Yes |
| Hashindexes |
No |
Yes |
No[b] |
No |
Yes |
| Full-textsearch indexes |
Yes |
No |
Yes[c] |
No |
No |
| Clusteredi
|
|