当前位置:网站首页>话说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一致。
为什么会有这样的差异呢,以后再追查。也借此给遇到同样问题的同学提个醒儿。
边栏推荐
- Industrial Finance 3.0: financial technology of "dredging blood vessels"
- Paper reading [open book video captioning with retrieve copy generate network]
- 上海字节面试问题及薪资福利
- make makefile cmake qmake都是什么,有什么区别?
- ForkJoin最全详解(从原理设计到使用图解)
- C#可空类型
- [paper reading] semi supervised left atrium segmentation with mutual consistency training
- Question 102: sequence traversal of binary tree
- Add salt and pepper noise or Gaussian noise to the picture
- AI人脸编辑让Lena微笑
猜你喜欢

mac版php装xdebug环境(m1版)

OpenSergo 即将发布 v1alpha1,丰富全链路异构架构的服务治理能力

AI人脸编辑让Lena微笑

Simple case of SSM framework

Harmonyos practice - Introduction to development, analysis of atomized services

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

EMMC打印cqhci: timeout for tag 10提示分析与解决

PTA 天梯赛练习题集 L2-004 搜索树判断

WEB架构设计过程

目标检测中的BBox 回归损失函数-L2,smooth L1,IoU,GIoU,DIoU,CIoU,Focal-EIoU,Alpha-IoU,SIoU
随机推荐
Sidecar mode
Differences and introduction of cluster, distributed and microservice
zabbix_get测试数据库失败
Pinduoduo product details interface, pinduoduo product basic information, pinduoduo product attribute interface
bat 批示处理详解
常用消息队列有哪些?
Randomly generate session_ id
《2022中国低/无代码市场研究及选型评估报告》发布
Ten stages of becoming a Senior IC Design Engineer. What stage are you in now?
Get the way to optimize the one-stop worktable of customer service
得物客服一站式工作台卡顿优化之路
分布式事务解决方案之2PC
How to get free traffic in pinduoduo new store and what links need to be optimized in order to effectively improve the free traffic in the store
高级程序员必知必会,一文详解MySQL主从同步原理,推荐收藏
nodejs获取客户端ip
pytorch_ 01 automatic derivation mechanism
随机生成session_id
Taobao Commodity details page API interface, Taobao Commodity List API interface, Taobao Commodity sales API interface, Taobao app details API interface, Taobao details API interface
STM32按键状态机2——状态简化与增加长按功能
ForkJoin最全详解(从原理设计到使用图解)