当前位置:网站首页>话说SQLyog欺骗了我!
话说SQLyog欺骗了我!
2022-07-07 00:35:00 【51CTO】
emax_task_apply这张表的数据达到了700多万,系统查询数据变得慢了起来。这次要对这张表涉及到的sql进行优化。
emax_task_apply现在的索引:
SHOW INDEX FROM emax_task_apply

我一向用SQLyog这个客户端工具。
如下两个sql语句,我在SQLyog通过多次执行比较,前者明显优于后者。
然后,信誓旦旦的告诉同事:
执行这两个sql, 比较一下, 性能很明显
SELECT SQL_NO_CACHE * FROM emax_task_apply WHERE task_id >= 1 AND enterprise_id>=1 AND user_id = 1587702862385631 AND apply_status != 'TASKAPPLY_INVALID';
SELECT SQL_NO_CACHE * FROM emax_task_apply WHERE user_id = 1587702862385631 AND apply_status != 'TASKAPPLY_INVALID';
同事后来反馈说,没有快到哪里呀,多次执行比较来看,反而前者比后者还稍慢一些呢。
后来,才发现,同事是用Navicat Premium 12 做的测试。
怎么同样的sql、同样的db,两个工具却存在这样的差异呢?
再来看他们的执行计划,2个工具对2个sql的分析结果是一样的。


我又找另一个同事,在DataGrip里执行,发现。。。
看来,“小海豚”SQLyog欺骗了我。
不过,还是不敢相信这个事实。
于是,我把2个sql放到程序里,在IDEA里跑testcase,发现测试结果与Navicat一致。
为什么会有这样的差异呢,以后再追查。也借此给遇到同样问题的同学提个醒儿。
边栏推荐
- Three level menu data implementation, nested three-level menu data
- 成为资深IC设计工程师的十个阶段,现在的你在哪个阶段 ?
- 如何提高网站权重
- linear regression
- 集群、分布式、微服务的区别和介绍
- Simple case of SSM framework
- Bat instruction processing details
- 分布式全局ID生成方案
- Industrial Finance 3.0: financial technology of "dredging blood vessels"
- Message queue: how to handle repeated messages?
猜你喜欢

Pinduoduo product details interface, pinduoduo product basic information, pinduoduo product attribute interface

产业金融3.0:“疏通血管”的金融科技

Simple case of SSM framework
![[paper reading] semi supervised left atrium segmentation with mutual consistency training](/img/d6/e6db0d76e81e49a83a30f8c1832f09.png)
[paper reading] semi supervised left atrium segmentation with mutual consistency training

得物客服一站式工作台卡顿优化之路

分布式全局ID生成方案

Unity keeps the camera behind and above the player

English grammar_ Noun possessive

Flink SQL realizes reading and writing redis and dynamically generates hset key

Dynamic memory management
随机推荐
MySQL-CentOS7通过YUM安装MySQL
make makefile cmake qmake都是什么,有什么区别?
Flinksql read / write PgSQL
AI face editor makes Lena smile
目标检测中的损失函数与正负样本分配:RetinaNet与Focal loss
Reptile exercises (III)
集群、分布式、微服务的区别和介绍
nodejs获取客户端ip
分布式事务解决方案之TCC
往图片添加椒盐噪声或高斯噪声
三级菜单数据实现,实现嵌套三级菜单数据
2pc of distributed transaction solution
Add salt and pepper noise or Gaussian noise to the picture
微信小程序蓝牙连接硬件设备并进行通讯,小程序蓝牙因距离异常断开自动重连,js实现crc校验位
Win configuration PM2 boot auto start node project
5. Data access - entityframework integration
【日常训练--腾讯精选50】235. 二叉搜索树的最近公共祖先
nVisual网络可视化
Message queue: how to deal with message backlog?
5. 数据访问 - EntityFramework集成