MySQL: storage engine, mysql storage engine
Storage engine: also called the table type, it is equivalent to the table storage mechanism, index solution, and other supporting functions.
Different storage engines provide different functions or optimizations due to different processing methods.
Select a proper engine based on actual needs.
· Storage type: Myisam, InnoDB, BDB, Memory, and Archive.
· The default table type is InnoDB. It can be configured through my. ini. Different Versions of MySQL may specify different default versions.
· When creating and editing a table, you can specify its storage engine:
Tip: the location defined by engine myisam is the same as that defined by character set. Both belong to the table attribute.
You can set both of the two when creating a table, in the format of engine myisam character set utf8;
1. Differences between InnoDB and Myisam:
① Different file storage methods: One InnoDB table is a file: tb_name.frm (storage structure). All InnoDB tables use the same InnoDB Storage space to store data and indexes; myisam is a table with three files: tb_name.frm (structure), tb_name.myd (data), tb_name.myl (INDEX );
② Myisam supports index compression. InnoDB indexes and data are bound and saved without compression, which is large in size.
③ InnoDB often uses row-level locks, while Myisam is a table-Level Lock, which features high concurrency.
④ InnoDB does not support FULLTEXI indexes and supports strong constraints on transactions, foreign keys, and data integrity.
InnoDB is better at updating and deleting, and Myisam is more advantageous in searching and inserting.
2. The basis for selecting a storage engine:
① Function; ② performance;