当前位置:网站首页>Database query optimization method
Database query optimization method
2022-06-25 04:56:00 【xxxibolva】
1.SELECT Try to avoid the use of *
2. Delete duplicate records
3. Delete all tables ( Retention structure ) Time use TRUNCATE Instead of DELETE
4. use WHERE Instead of HAVING
5. use EXISTS Instead of IN、 use NOT EXISTS Instead of NOT IN
6. Using indexes to improve efficiency , But not more is better , The index number of a table should not exceed 6 individual
7. Try to use numeric fields
8. Try to avoid full scan , You can first consider WHERE And ORDER BY Index the columns involved
Supplement and sort out ing
边栏推荐
- 在 .NET 6 中使用 dotnet format 格式化代码
- [image fusion] image fusion based on MATLAB directional discrete cosine transform and principal component analysis [including Matlab source code 1907]
- 【图像融合】基于matlab方向离散余弦变换和主成分分析图像融合【含Matlab源码 1907期】
- SQL lab range explanation
- buuctf(pwn)
- Startup mode of SoC verification environment
- Triangle class (construction and deconstruction)
- Apache+php uploading large files
- JS call() and apply()
- Redis (17)
猜你喜欢

Teach you to write non maintainable PHP code step by step

File upload vulnerability (III)

30岁了开始自学编程,家里比较困难还来得及吗?

基于SSH实现的学生成绩管理系统

Méthode de récupération des données d'ouverture du disque dur à l'état solide

Why does the SQL statement hit the index faster than it does not?

电脑的dwg文件怎么打开

绝了!自动点赞,我用 PyAutoGUI!

执行SQL响应比较慢,你有哪些排查思路?

"Daily practice, happy water" 1108 IP address invalidation
随机推荐
2021-10-24
JDBC (IV)
Calculate student grade (virtual function and polymorphism)
Separation of storage and computing in Dahua cloud native database
Google Earth Engine(GEE)——全球JRC/GSW1_1/YearlyHistory数据集的批量下载(中国区域)
Cannot import name 'escape' from 'jinja2' [solved successfully]
The solution of wechat applet switchtab unable to take parameters
Mysql interactive_ Timeout and wait_ Timeout differences
Database overview
My IC journey - the growth of senior chip design verification engineers - "Hu" said that IC engineers are perfect and advanced
Kotlin Compose 完善toDo项目 Surface 渲染背景 与阴影
Difference between asemi high power FET and triode
epplus复制模板后打印区域变小的问题
为什么SQL语句命中索引比不命中索引要快?
There is 404 in the laravel visit, except the home page is redirected; Index php
Web3 DApp用户体验最佳实践
At the age of 30, I began to learn programming by myself. Is it still time for me to have difficulties at home?
TX Text Control 30.0 ActiveX
Penetration test - directory traversal vulnerability
固态硬盘开盘数据恢复的方法