当前位置:网站首页>MySQL Samsung index and cost calculation
MySQL Samsung index and cost calculation
2022-04-21 13:49:00 【bingtanghulu_ six】
1. Samsung index concept
Samsung index The concept of is more tongue twister , I understood it myself and sorted it out :
1. B+ Try to put the adjacent records on the tree together
2. The order of data in the index is consistent with that in the search , That is to say order by and group by Try to keep the fields in the same order as the index .
3. Try to overwrite the index , Avoid returning to your watch .

2. Several optimization suggestions for index
1. Search only ,order by,group by Create index for query column ;
2. Try to use Samsung index ;
3. The primary key column should not update, Best use insert;
4. Do not create indexes on redundant and duplicate columns . The calculation formula refers to the previous blog .
5. Unused index delete
3. mysql-cost Value costing
Calculation cost Let's say before it's worth it I/0 Time and CPU Time
I/0 Time = Seek time + Rotation time + Transmission time ( once I/0 It's about time 9-10ms about ), Among them, the seek time is the longest , Because he is a mechanical movement , The rotation time is very fast , Usually, the number of revolutions of our computer is usually thousands or 1 More than ten thousand , The transmission time is ns level , negligible . The biggest waste of time is when searching for a way
版权声明
本文为[bingtanghulu_ six]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204211346550130.html
边栏推荐
- Machine learning notes - Moore Penrose pseudo inverse
- List stores map values
- Vagrant detailed tutorial
- Number II that occurs only once (hash, bit operation, logic circuit, finite state automata)
- [special topic of stack and queue] - Dual queue simulation stack
- Unittest单元测试(一)
- Promise -- several key problems
- International logistics centralized transportation system source code, overseas warehousing cross-border transshipment system source code
- Peking University ACM problems 1008: Maya calendar
- Metasploit penetration
猜你喜欢

Markdown grammar and test

Use of JSON server

第三个项目——PacMan(2)

If the field lines are the same, they will be merged into another field SQL statement?

The sales attribute values in sku must be filled in in pairs. Why

Achieve random labels, font size, color random display

【栈和队列专题】—— 双队列模拟栈

Réaliser l'affichage aléatoire de l'étiquette, de la taille de la police et de la couleur

Exercise questions and answers of quality, investment and progress control in 2022 supervision engineer examination

SECOND: Sparsely Embedded Convolutional Detection
随机推荐
软件工程-基础篇刷题
EsgynDB 使用JDBC UDR访问远程Trafodion的几个问题小结
图像分类的训练基本过程——以MobileNet_v3为例
If the field lines are the same, they will be merged into another field SQL statement?
Benchmark cell detection scheme based on violence matching threshold
Tool function - decimal place processing
暴力匹配阈值的基准细胞检测方案
Markdown语法及测试
EsgynDB 关于带索引的DELETE性能提升
【leetcode】144.二叉树的前序遍历
SQLyog导入sql文件
第三个项目——PacMan(2)
NPM --- NPM configuration file
Peking University ACM problems 1011: sticks
Character sorting in the string (10 points): please write the function fun to sort the strings with a length of 8 characters in descending order.
EsgynDB之TRIM函数
Common configuration items of echart (line, area, text)
深度学习与图像识别:原理与实践 笔记Day_15
String count (convert to base)
npm---npm配置文件