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) 支持外键 不支持外键
    关注点 事物 性能
  • 相关阅读:
    css 垂直居中
    pdf.js 标题修改
    electron 打包时文件复制到程序目录下
    js 高阶函数
    计算一个数字是否素数
    Object.assign()
    vue 路由页面 首次打开浏览器 返回上一页异常问题
    swagger使用报错:No enum constant org.springframework.web.bind.annotation.RequestMethod.get
    idea 关于查询的快捷键
    域渗透之CrackMapExec
  • 原文地址:https://www.cnblogs.com/du-z/p/12822932.html
Copyright © 2011-2022 走看看