Choosing the Right Storage Engine選擇合適的存儲引擎
Contents內容
A high-level overview of the main reasons for choosing a particular storage engine:有關選擇特定存儲引擎的主要原因的高層概述:
Topic List主題清單
General Purpose一般用途
- XtraDB is the best choice in the majority of cases until MariaDB 10.1. 在MariaDB 10.1之前的大多數情況下,XtraDB是最佳選擇。It is a performance-enhanced fork of InnoDB and is MariaDB's default engine until MariaDB 10.1. 它是InnoDB的性能增強分支,並且是MariaDB 10.1之前的默認引擎。
- InnoDB is a good general transaction storage engine. InnoDB是一個很好的常規事務存儲引擎。It is the default storage engine from MariaDB 10.2 (as well as MySQL). 它是MariaDB 10.2(以及MySQL)的默認存儲引擎。For earlier releases, XtraDB is a performance enhanced fork of InnoDB and is usually preferred. 對於早期版本,XtraDB是InnoDB的性能增強分支,通常是首選。
- Aria, MariaDB's more modern improvement on MyISAM, has a small footprint and allows for easy copying between systems. MariaDB是對MyISAM的更現代的改進,Aria占用空間小,並且允許在系統之間輕松進行復制。
- MyISAM has a small footprint and allows for easy copying between systems. MyISAM占用空間小,可輕松在系統之間進行復制。MyISAM is MySQL's oldest storage engine. MyISAM是MySQL最古老的存儲引擎。There is usually little reason to use it except for legacy purposes. 除了遺留用途,通常沒有其他理由使用它。Aria is MariaDB's more modern improvement. Aria是MariaDB的更現代改進。
Scaling, Partitioning縮放,分區
When you want to split your database load on several servers or optimize for scaling. 當您想要在幾台服務器上拆分數據庫負載或為擴展而優化時。We also suggest looking at Galera, a synchronous multi-master cluster.我們還建議您查看Galera,一個同步的多主群集。
- TokuDB is a transactional storage engine which is optimized for workloads that do not fit in memory, and provides a good compression ratio. TokuDB是一個事務存儲引擎,針對不適合內存的工作負載進行了優化,並提供了良好的壓縮率。
- Spider uses partitioning to provide data sharding through multiple servers. Spider使用分區來通過多個服務器提供數據分片。
- ColumnStore utilizes a massively parallel distributed data architecture and is designed for big data scaling to process petabytes of data. ColumnStore利用大規模並行分布式數據架構,專為大數據擴展而設計,以處理PB級數據。
- The MERGE storage engine is a collection of identical MyISAM tables that can be used as one. MERGE存儲引擎是相同的MyISAM表的集合,可以用作一個表。"Identical" means that all tables have identical column and index information. “相同”是指所有表具有相同的列和索引信息。
Compression / Archive壓縮/存檔
- MyRocks enables greater compression than InnoDB, as well as less write amplification giving better endurance of flash storage and improving overall throughput. 與InnoDB相比,MyRocks可以實現更大的壓縮,並且寫入放大更少,從而可以更好地承受閃存存儲並提高整體吞吐量。
- TokuDB is a transactional storage engine which is optimized for workloads that do not fit in memory, and provides a good compression ratio. TokuDB是一個事務存儲引擎,針對不適合內存的工作負載進行了優化,並提供了良好的壓縮率。
- The Archive storage engine is, unsurprisingly, best used for archiving. 毫無疑問,存檔存儲引擎最適合用於存檔。
Connecting to Other Data Sources連接到其他數據源
When you want to use data not stored in a MariaDB database. 當您要使用未存儲在MariaDB數據庫中的數據時。
- CONNECT allows access to different kinds of text files and remote resources as if they were regular MariaDB tables. CONNECT允許訪問不同類型的文本文件和遠程資源,就像它們是常規的MariaDB表一樣。
- The CSV storage engine can read and append to files stored in CSV (comma-separated-values) format. CSV存儲引擎可以讀取並追加到以CSV(逗號分隔值)格式存儲的文件。However, since MariaDB 10.0, CONNECT is a better choice and is more flexibly able to read and write such files. 但是,從MariaDB 10.0開始,CONNECT是一個更好的選擇,並且能夠更靈活地讀取和寫入此類文件。
- FederatedX uses libmysql to talk to the data source, the data source being a remote RDBMS. FederatedX使用libmysql與數據源通信,該數據源是遠程RDBMS。Currently, since FederatedX only uses libmysql, it can only talk to another MySQL RDBMS. 當前,由於FederatedX僅使用libmysql,因此它只能與另一個MySQL RDBMS通信。
- CassandraSE is a storage engine allowing access to an older version of Apache Cassandra NoSQL DBMS. CassandraSE是一種存儲引擎,允許訪問較舊版本的Apache Cassandra NoSQL DBMS。It was relatively experimental, and is no longer being actively developed. 它是相對實驗性的,不再被積極開發。
Search Optimized搜索優化
Search engines optimized for search. 針對搜索進行了優化的搜索引擎。
- SphinxSE is used as a proxy to run statements on a remote Sphinx database server (mainly useful for advanced fulltext searches). SphinxSE用作在遠程Sphinx數據庫服務器上運行語句的代理(主要用於高級全文搜索)。
- Mroonga provides fast CJK-ready full text searching using column store. Mroonga使用列存儲提供快速的CJK就緒全文搜索。
Cache, Read-only緩存,只讀
- MEMORY does not write data on-disk (all rows are lost on crash) and is best-used for read-only caches of data from other tables, or for temporary work areas. MEMORY不會在磁盤上寫入數據(崩潰時所有行都會丟失),並且最適合用於其他表的數據的只讀緩存或臨時工作區。With the default XtraDB and other storage engines having good caching, there is less need for this engine than in the past. 在默認的XtraDB和其他具有良好緩存的存儲引擎的情況下,與過去相比,對該引擎的需求減少了。
Other Specialized Storage Engines其他專用存儲引擎
- S3 Storage Engine is a read-only storage engine that stores its data in Amazon S3. S3 Storage Engine是一個只讀存儲引擎,將其數據存儲在Amazon S3中。
- Sequence allows the creation of ascending or descending sequences of numbers (positive integers) with a given starting value, ending value and increment, creating virtual, ephemeral tables automatically when you need them. 序列允許創建具有給定起始值,終止值和增量的數字升序或降序(正整數),並在需要時自動創建虛擬的臨時表。
- The BLACKHOLE storage engine accepts data but does not store it and always returns an empty result. BLACKHOLE存儲引擎接受數據,但不存儲數據,並且始終返回空結果。This can be useful in replication environments, for example, if you want to run complex filtering rules on a slave without incurring any overhead on a master. 例如,如果要在從屬服務器上運行復雜的過濾規則而又不會在主服務器上產生任何開銷,則這在復制環境中很有用。
- OQGRAPH allows you to handle hierarchies (tree structures) and complex graphs (nodes having many connections in several directions). OQGRAPH允許您處理層次結構(樹結構)和復雜圖(節點在多個方向上具有許多連接)。
Alphabetical List按字母順序排列
- The Archive storage engine is, unsurprisingly, best used for archiving.毫無疑問,存檔存儲引擎最適合用於存檔。
- Aria, MariaDB's more modern improvement on MyISAM, has a small footprint and allows for easy copy between systems.MariaDB在MyISAM上進行了更現代的改進,占地面積小,並且允許在系統之間輕松復制。
- The BLACKHOLE storage engine accepts data but does not store it and always returns an empty result. This can be useful in replication environments, for example, if you want to run complex filtering rules on a slave without incurring any overhead on a master.
- CassandraSE is a storage engine allowing access to an older version of Apache Cassandra NoSQL DBMS. It was relatively experimental, and is no longer being actively developed.
- ColumnStore utilizes a massively parallel distributed data architecture and is designed for big data scaling to process petabytes of data.
- CONNECT allows access to different kinds of text files and remote resources as if they were regular MariaDB tables.
- The CSV storage engine can read and append to files stored in CSV (comma-separated-values) format. However, since MariaDB 10.0, CONNECT is a better choice and is more flexibly able to read and write such files.
- FederatedX uses libmysql to talk to the data source, the data source being a remote RDBMS. Currently, since FederatedX only uses libmysql, it can only talk to another MySQL RDBMS.
- InnoDB is a good general transaction storage engine. 是一個很好的常規事務存儲引擎。It is the default storage engine from MariaDB 10.2 (as well as MySQL). 它是MariaDB 10.2(以及MySQL)的默認存儲引擎。For earlier releases, XtraDB is a performance enhanced fork of InnoDB and is usually preferred.對於早期版本,XtraDB是InnoDB的性能增強分支,通常是首選。
- The MERGE storage engine is a collection of identical MyISAM tables that can be used as one. "Identical" means that all tables have identical column and index information.
- MEMORY does not write data on-disk (all rows are lost on crash) and is best-used for read-only caches of data from other tables, or for temporary work areas. 不會在磁盤上寫數據(崩潰時所有行都會丟失),並且最好用於其他表的數據的只讀緩存或臨時工作區。With the default XtraDB and other storage engines having good caching, there is less need for this engine than in the past.在默認的XtraDB和其他具有良好緩存的存儲引擎的情況下,與過去相比,對該引擎的需求減少了。
- Mroonga provides fast CJK-ready full text searching using column store.
- MyISAM has a small footprint and allows for easy copying between systems. 占用空間小,可輕松在系統之間進行復制。MyISAM is MySQL's oldest storage engine. MyISAM是MySQL最古老的存儲引擎。There is usually little reason to use it except for legacy purposes. 除了遺留用途,通常沒有其他理由使用它。Aria is MariaDB's more modern improvement.Aria是MariaDB的更現代改進。
- MyRocks enables greater compression than InnoDB, as well as less write amplification giving better endurance of flash storage and improving overall throughput.與InnoDB相比,它可以實現更大的壓縮,並且寫入放大更少,從而使閃存具有更好的耐用性並提高了總體吞吐量。
- OQGRAPH allows you to handle hierarchies (tree structures) and complex graphs (nodes having many connections in several directions).
- S3 Storage Engine is a read-only storage engine that stores its data in Amazon S3.
- Sequence allows the creation of ascending or descending sequences of numbers (positive integers) with a given starting value, ending value and increment, creating virtual, ephemeral tables automatically when you need them.
- SphinxSE is used as a proxy to run statements on a remote Sphinx database server (mainly useful for advanced fulltext searches).
- Spider uses partitioning to provide data sharding through multiple servers.
- TokuDB is a transactional storage engine which is optimized for workloads that do not fit in memory, and provides a good compression ratio.
- XtraDB is the best choice in the majority of cases until MariaDB 10.1. It is a performance-enhanced fork of InnoDB and is MariaDB's default engine until MariaDB 10.1.