当前位置:网站首页>Throwing a question? The execution speed of the Count operation in the Mysql environment is very slow. You need to manually add an index to the primary key---MySql optimization 001
Throwing a question? The execution speed of the Count operation in the Mysql environment is very slow. You need to manually add an index to the primary key---MySql optimization 001
2022-08-09 09:59:00 【cool brain】
Find a table in the project, select count(1) is very, very slow in about 10 seconds, the solution:
Add unique so on the primary key of the table, and then perform the select count operation, you can find that this time becomes 0.28 seconds
The speed is very fast, but it is very strange why the speed is slow, because the primary key is generally indexed by default, why do you need it
It's weird to manually re-index.
I don't understand...hey..what's going on...experts tell me..
边栏推荐
猜你喜欢
随机推荐
Secretive present: in modern times
Firebase+Facebook 授权 web 登录提示域名验证或跳转错误
需求侧电力负荷预测(Matlab代码实现)
2021-04-26QGIS3.10加载天地图影像(地图瓦片)的一种方法
Ontology development diary 04 - to try to understand some aspects of protege
自定义类型:结构体,枚举,联合
[Machine Learning] Detailed explanation of web crawler combat
2. Byte stream
m个样本的梯度下降
3.练习Thread
程序环境和预处理
《刷题日记》2
Practical skills: a key for image information in the Harbor, quick query image
cannot import name ‘load_offloaded_weights‘ from ‘accelerate.utils‘ (/home/huhao/anaconda3/envs/huha
Arrays.toString( )打印二维数组
记录一次被入侵5900端口经历
What is the reason for the suspended animation of the migration tool in the GBase database?
文件操作
Ontology development diary 02 - simple sparql query
electron 应用开发优秀实践