mysql engine csv_MySQL table engine

5.7 默认使用的是 InnoDB engine

常见的 engine 类型, MyISAM 与 InnoDB 的区别

大部分情况下,采用默认的 InnoDB 即可

InnoDB: The default storage engine in MySQL 5.7. InnoDB is a transaction-safe (ACID compliant) storage engine for MySQL that has commit, rollback, and crash-recovery capabilities to protect user data. InnoDB row-level locking (without escalation to coarser granularity locks) and Oracle-style consistent nonlocking reads increase multi-user concurrency and performance. InnoDB stores user data in clustered indexes to reduce I/O for common queries based on primary keys. To maintain data integrity, InnoDB also supports FOREIGN KEY referential-integrity constraints.

除非数据量大到需要放弃事务的时候,再考虑 MyISAM 吧

MyISAM is slightly faster than InnoDB, and implements the FULLTEXT index which is quite useful for integrating search capabilities. MyISAM is not transacted and doesn't implement foreign key constraints, which is a major drawback.

除了 MySQL table 可以指定 engine 之外,database 是否也可以指定 engine

database 没有 engine 的概念,只有 table 有。

所以,同一个 database, 不同的表可以采用不同的 engine。

You are not restricted to using the same storage engine for an entire server or schema. You can specify the storage engine for any table. For example, an application might use mostly InnoDB tables, with one CSV table for exporting data to a spreadsheet and a few MEMORY tables for temporary workspaces.

如何查看表的 engine 类型

SHOW TABLE STATUS\G;

例如,wordpress 的各数据表 engine 类型都是 InnoDB

90aed70b9e9774741b226dc183fe30b0.png

参考

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值