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) 支持外键 不支持外键
    关注点 事物 性能
  • 相关阅读:
    HTML元素盒模型
    对git使用的初步总结
    在windows上,使用虚拟机安装苹果操作系统
    C++多例模式下对Instance的使用
    C++中的Inline函数的使用
    gitbash安装与使用
    C++中的Inline函数
    git bash下添加忽略文件列表
    C++数据类型(data type)介绍
    RFID会议签到系统总结(六)――系统配置(下)
  • 原文地址:https://www.cnblogs.com/du-z/p/12822932.html
Copyright © 2011-2022 走看看