当前位置:网站首页>Practical case of SQL optimization: speed up your database

Practical case of SQL optimization: speed up your database

2022-07-05 01:53:00 Wen Yu is solemn

1、MySQL Basic architecture

1)MySQL The infrastructure diagram of

Sinister client It can be regarded as a client , There are many clients , Like we often use you CMD Black window , Like what we often use for learning WorkBench, Like what enterprises often use Navicat Tools , They are all one client . The pile on the right can be regarded as Server(MySQL The service side ), We will Server Subdivide into sql Layer and storage engine layer .

When the data is queried , Will return to the actuator . On the one hand, the executor writes the results to the query cache , The next time you check again , You can get data directly from the query cache . On the other hand , Respond directly to the result back to the client .

2) Query database engine

① show engines;

② show variables like “%storage_engine%”;

3) Specifies the storage engine for the database object

create table tb(
    id int(4) auto_increment,
    name varchar(5),
原网站

版权声明
本文为[Wen Yu is solemn]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/02/202202141008325896.html