当前位置:网站首页>Mysql database, inconsistent index character set, slow SQL query, interface timeout
Mysql database, inconsistent index character set, slow SQL query, interface timeout
2022-04-23 03:09:00 【T_ yoo_ csdn】
mysql database ,slowsql Slow query causes interface timeout problem
The phenomenon : Log in slowsql, It can't be queried in the database , The interface timed out and cannot be loaded . Multi table associated query , There is an index, but it is not useful in the production environment .
The analysis process :
1. View execution plan , explain. In the development environment, the time is very fast , Timeout in production environment , Index failure . Relational query , How many tables are there 10 10000 data ,join Take Cartesian set , The amount of data queried is very large .
2. To optimize the sql, Development environment from 10 Optimize to... In about seconds 0. Seconds . The production environment still times out .
3. Since there are no other error logs , I still doubt the problem on the database side . Because each environment is consistent . First, eliminate the database version problem .
4. Check whether the watch is locked ,show OPEN TABLES where In_use>0. If there is , see 5
5. Query process ,show processlist. After querying the locked process kill fall
reason :
The index of the associated query , Character set and sort character set are inconsistent , Cause index to fail .
版权声明
本文为[T_ yoo_ csdn]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204220629204754.html
边栏推荐
- .NET7之MiniAPI(特别篇):.NET7 Preview3
- Xamarin效果第二十二篇之录音效果
- Load view Caton
- Binary tree
- Source Generator实战
- 最通俗易懂的依赖注入与控制反转
- Summary of interface automation interview questions for software testing
- be based on. NETCORE development blog project starblog - (1) why do you need to write your own blog?
- Blazor University (12) - component lifecycle
- Impact of AOT and single file release on program performance
猜你喜欢
Blazor University (11) component - replace attributes of subcomponents
Xamarin效果第二十二篇之录音效果
Tencent video VIP member, weekly card special price of 9 yuan! Tencent official direct charging, members take effect immediately!
Summary of interface automation interview questions for software testing
2022年P气瓶充装培训试题及模拟考试
.NET点滴:说说Middleware构造中获取不到Scoped服务的问题
Blazor University (12) - component lifecycle
ASP. Net and ASP NETCORE multi environment configuration comparison
MySQL port is occupied when building xampp
Detailed log display of openfeign call
随机推荐
ASP. Net and ASP NETCORE multi environment configuration comparison
Realize QQ login with PHP
基于.NetCore开发博客项目 StarBlog - (1) 为什么需要自己写一个博客?
求二叉树的叶子结点个数
yes. Net future
腾讯视频VIP会员,周卡特价9元!腾讯官方直充,会员立即生效!
准备一个月去参加ACM,是一种什么体验?
2022年P气瓶充装培训试题及模拟考试
使用split来解决“最常见的单词”问题
【鉴权/授权】自定义一个身份认证Handler
基于.NetCore开发博客项目 StarBlog - (2) 环境准备和创建项目
How does Microsoft solve the problem of multiple PC programs
Recursion - outputs continuously increasing numbers
Maui initial experience: Cool
Development notes of raspberry pie (12): start Advantech industrial control raspberry pie uno-220 Kit (I): introduction and operation of the system
OLED multi-level menu record
[new version release] componentone added Net 6 and blazor platform control support
Blazor University (11)组件 — 替换子组件的属性
Source generator actual combat
使用两种方法来解决“最大回文数乘积”问题