zoukankan      html  css  js  c++  java
  • MySQL数据库----存储引擎

    • 查询命令
    mysql> show engines;
    +--------------------+---------+----------------------------------------------------------------+--------------+------+------------+
    | Engine             | Support | Comment                                                        | Transactions | XA   | Savepoints |
    +--------------------+---------+----------------------------------------------------------------+--------------+------+------------+
    | InnoDB             | DEFAULT | Supports transactions, row-level locking, and foreign keys     | YES          | YES  | YES        |
    | CSV                | YES     | CSV storage engine                                             | NO           | NO   | NO         |
    | MyISAM             | YES     | MyISAM storage engine                                          | NO           | NO   | NO         |
    | BLACKHOLE          | YES     | /dev/null storage engine (anything you write to it disappears) | NO           | NO   | NO         |
    | PERFORMANCE_SCHEMA | YES     | Performance Schema                                             | NO           | NO   | NO         |
    | MRG_MYISAM         | YES     | Collection of identical MyISAM tables                          | NO           | NO   | NO         |
    | ARCHIVE            | YES     | Archive storage engine                                         | NO           | NO   | NO         |
    | MEMORY             | YES     | Hash based, stored in memory, useful for temporary tables      | NO           | NO   | NO         |
    | FEDERATED          | NO      | Federated MySQL storage engine                                 | NULL         | NULL | NULL       |
    +--------------------+---------+----------------------------------------------------------------+--------------+------+------------+
    
    mysql> show variables like '%engine%';
    +----------------------------------+--------+
    | Variable_name                    | Value  |
    +----------------------------------+--------+
    | default_storage_engine           | InnoDB |
    | default_tmp_storage_engine       | InnoDB |
    | disabled_storage_engines         |        |
    | internal_tmp_disk_storage_engine | InnoDB |
    +----------------------------------+--------+
    
    • mysql主要的存储引擎myisam和innodb的不同之处?
    不同点 innodb myisam
    事务的支持不同 支持事务 不支持事务
    锁粒度 行锁应用(适合高并发) 表锁
    缓存 既缓存索引文件又缓存数据文件 只能缓存索引文件
    主外键(foreign key) 支持外键 不支持外键
    关注点 事物 性能
  • 相关阅读:
    hdu 1408 acdearm "Money, Money, Money"
    hdu 1284 钱币兑换问题
    hdu 1248 寒冰王座
    hdu 1203 I NEED A OFFER!
    acdream 1726 A Math game
    csu 1640 机智的刷题方式(完全背包)
    NYOJ 734 奇数阶魔方
    bestcoder Round #79 (div.2)jrMz and angles
    南阳oj 题目6 喷水装置(一)
    小区的路
  • 原文地址:https://www.cnblogs.com/du-z/p/12822932.html
Copyright © 2011-2022 走看看