MySQL的索引数据结构

来源:互联网 发布:java程序员培训学校 编辑:程序博客网 时间:2024/06/15 22:02

       MySQL目前有四种索引:B-Tree索引最常见的索引类型,大部分引擎都支持B树索引。HASH索引只有Memory引擎支持,使用场景简单。R-Tree索引空间索引是MyISAM的一个特殊索引类型,主要用于地理空间数据类型,通常使用较少。Full-text全文索引也是MyISAM的一个特殊索引类型,主要用于全文索引。

mysql> SELECT version();+-----------+| version() |+-----------+| 5.6.37    |+-----------+1 row in set (0.00 sec)mysql> SHOW engines\G*************************** 1. row ***************************      Engine: FEDERATED     Support: NO     Comment: Federated MySQL storage engineTransactions: NULL          XA: NULL  Savepoints: NULL*************************** 2. row ***************************      Engine: MRG_MYISAM     Support: YES     Comment: Collection of identical MyISAM tablesTransactions: NO          XA: NO  Savepoints: NO*************************** 3. row ***************************      Engine: MyISAM     Support: YES     Comment: MyISAM storage engineTransactions: NO          XA: NO  Savepoints: NO*************************** 4. row ***************************      Engine: BLACKHOLE     Support: YES     Comment: /dev/null storage engine (anything you write to it disappears)Transactions: NO          XA: NO  Savepoints: NO*************************** 5. row ***************************      Engine: CSV     Support: YES     Comment: CSV storage engineTransactions: NO          XA: NO  Savepoints: NO*************************** 6. row ***************************      Engine: MEMORY     Support: YES     Comment: Hash based, stored in memory, useful for temporary tablesTransactions: NO          XA: NO  Savepoints: NO*************************** 7. row ***************************      Engine: ARCHIVE     Support: YES     Comment: Archive storage engineTransactions: NO          XA: NO  Savepoints: NO*************************** 8. row ***************************      Engine: InnoDB     Support: DEFAULT     Comment: Supports transactions, row-level locking, and foreign keysTransactions: YES          XA: YES  Savepoints: YES*************************** 9. row ***************************      Engine: PERFORMANCE_SCHEMA     Support: YES     Comment: Performance SchemaTransactions: NO          XA: NO  Savepoints: NO9 rows in set (0.00 sec)mysql>


原创粉丝点击