MySQL: storage engine, mysql storage engine

Source: Internet
Author: User

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;

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.