Sample analysis of MySQL table files

WBOY
Release: 2023-05-28 17:49:12
forward
1406 people have browsed it

Introduction to MySQL table files

One database corresponds to one folder

One table corresponds to one or more files

Engine myisam, one table corresponds to three files

.frm stores the table structure

.myd stores the table data

.myi stores the index of the table data

Engine innodb, one table corresponds to a table structure file, all table data of innodb are saved together in the ibdata1 file. When the database scale increases, files such as ibdata2 and ibdata3 will be automatically created

.myd stores table data

Note: It is recommended to use the innodb engine

The difference between innodb engine and myisam engine:

Engine Difference

Myisam

The query speed is fast, prone to fragmentation, and cannot constrain the number

Innodb

The query speed was not as fast as myisam query before, but now it has been accelerated. No fragmentation. Can constrain data

The above is the detailed content of Sample analysis of MySQL table files. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:yisu.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!