当前位置:网站首页>Estimation of SQL execution cost by MySQL query optimizer
Estimation of SQL execution cost by MySQL query optimizer
2022-06-28 07:55:00 【star++】
summary
mysql in , There are query optimizers , Is specifically used to estimate the cost of query statements , Then choose one mysql The lowest cost scheme is considered to be implemented . Today, let's look at some common queries sql How is the cost of the statement estimated ,mysql What is the basis ?
Estimate the preparation knowledge points
1mysql What data is the estimate based on
a.mysql Since you want to estimate the query cost , Then there must be some calculations , It's like we're going to a place , Want to know how long it will take .
The formula is distance divided by speed . Different vehicles have different speeds , The total distance of different routes is also different .
b.mysql There are data similar to the above .mysql Every table has statistics , Use command SHOW TABLE STATUS You can see that ,
The command is followed by a parameter called the table name . For example, to perform show table status like '%user%'\G; command , We can see
Two fields Rows and Data_length,Rows Number of table records ,Data_length Indicates the number of bytes occupied by data (边栏推荐
- Redis master-slave structure and application scenarios
- Localization SoC development plan
- Kubernetes cluster command line tool kubectl
- How redis solves cache avalanche, breakdown and penetration problems
- HJ字符个数统计
- 分析 NFT 项目的 5 个指标
- Safety training is the greatest benefit for employees! 2022 induction safety training for new employees
- Implementation of commit message standardized control in large projects
- Redis cerebral fissure
- Section VII starting principle and configuration of zynq
猜你喜欢

PLC -- Notes

Recommended system series (Lecture 5): Optimization Practice of sorting model

Configuring multiple instances of MySQL under Linux

kubernetes集群命令行工具kubectl

Airflow2.1.1 summary of the pits stepped on in actual combat!!

SOC serial port configuration

8 张图 | 剖析 Eureka 的首次同步注册表

Disposition Flex

SQL master-slave replication setup

Uninstall and reinstall the latest version of MySQL database. The test is valid
随机推荐
Design and implementation of spark offline development framework
Study notes 22/1/10
Kubernetes理论基础
Redis persistence problem and final solution
Idea package together, using compact middle packages to solve &
A single node obtains the lock lock of the order number
本周二晚19:00战码先锋第8期直播丨如何多方位参与OpenHarmony开源贡献
Dbeaver 22.1.1 release, visual database management platform
Kubernetes theoretical basis
7-1 understand everything
Section Xi. Axi of zynq_ Use of DMA
Unity UI shadow component
What is EC blower fan?
ACM notes
Software design of resistance test board
【js】-【节流、防抖函数】
Airflow2 configuration windows azure SSO details based on oauth2 protocol
剑指Offer||:链表(简单)
[JS] - [DFS, BFS application] - learning notes
ACM笔记