• 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) 支持外键 不支持外键
    关注点 事物 性能
  • 相关阅读:
    【POJ1961】period
    主席树入门
    noip模拟【tea】
    noip模拟【service】
    noip模拟【noname】
    clearfix清除浮动
    九大内置对象
    2017/10/10 jar包错误
    mybatis案例源码详解
    自动类型转换
  • 原文地址:https://www.cnblogs.com/du-z/p/12822932.html
Copyright © 2020-2023  润新知