当前位置:网站首页>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 (边栏推荐
- 大型项目中的Commit Message规范化控制实现
- At 19:00 on Tuesday evening, the 8th live broadcast of battle code Pioneer - how to participate in openharmony's open source contribution in multiple directions
- Kubernetes理论基础
- Today's notes 22/1/7
- Investment transaction and settlement of the fund
- Redis implements distributed locks
- Application of XOR. (extract the rightmost 1 in the number, which is often used in interviews)
- Leetcode learning records
- "Three routines" of digital collection market
- How to insert a single quotation mark into a table as a data type in Oracle pl/sql
猜你喜欢

Rediscluster cluster mode capacity expansion node

Uninstall and reinstall the latest version of MySQL database. The test is valid

22/02/14 study notes

2021 programming language ranking summary

Leetcode learning records

Software design of power control board

What is EC blower fan?

Airflow2.1.1 ultra detailed installation document

Today's notes 22/1/7

剑指Offer||:链表(简单)
随机推荐
flex布局
asp. Net error "/" server error in the application. String or binary data would be truncated. The statement...
Leetcode learning records
云原生:云计算技术再次升级 开启全面云开发时代
Ambari (V) ---ambari integrated Azkaban (valid for personal test)
本周二晚19:00战码先锋第8期直播丨如何多方位参与OpenHarmony开源贡献
QT -- communication protocol
kubernetes集群命令行工具kubectl
Install haproxy
LeetCode之三步问题
How to insert a single quotation mark into a table as a data type in Oracle pl/sql
asp. Net datalist to display product information and pictures
Ice - resources
How to use redis to solve concurrency problems
HJ字符个数统计
Flutter realizes the function of "shake"
Introduction and several months' experience of extending the solution thanos of Prometheus
HJ delete the character with the least number of occurrences in the string
ES6 use of return in arrow function
HJ字符串排序