当前位置:网站首页>sql语句优化,order by desc速度优化
sql语句优化,order by desc速度优化
2022-07-06 09:40:00 【CSDN问答】
我有一个sql需要优化,使用 order by desc+ limit后查询速度特别慢。有什么办法可以解决吗?
SELECT electricity_meter from device_history_log WHERE device_id = '3130303934323735353339343030303030303030' and year (create_time) = '2022' ORDER BY id desc LIMIT 1


在网上找了一些解决方案,但大多数不符合情况以及没有效果,请各位帮忙看一下
边栏推荐
- 面试突击63:MySQL 中如何去重?
- Solid principle
- TCP connection is more than communicating with TCP protocol
- CTF reverse entry question - dice
- Pyspark operator processing spatial data full parsing (5): how to use spatial operation interface in pyspark
- Establishment of graphical monitoring grafana
- Deploy flask project based on LNMP
- Flink parsing (IV): recovery mechanism
- 沉淀下来的数据库操作类-C#版(SQL Server)
- Sqoop I have everything you want
猜你喜欢

Sqoop I have everything you want

分布式(一致性协议)之领导人选举( DotNext.Net.Cluster 实现Raft 选举 )

EasyCVR接入设备开启音频后,视频无法正常播放是什么原因?

FlutterWeb浏览器刷新后无法回退的解决方案

Start job: operation returned an invalid status code 'badrequst' or 'forbidden‘
![[ASM] introduction and use of bytecode operation classwriter class](/img/0b/87c9851e577df8dcf8198a272b81bd.png)
[ASM] introduction and use of bytecode operation classwriter class

Solr appears write Lock, solrexception: could not get leader props in the log

Concept and basic knowledge of network layering

2022年大厂Android面试题汇总(一)(含答案)

Uipath browser performs actions in the new tab
随机推荐
基于STM32+华为云IOT设计的智能路灯
C version selenium operation chrome full screen mode display (F11)
应用服务配置器(定时,数据库备份,文件备份,异地备份)
[elastic] elastic lacks xpack and cannot create template unknown setting index lifecycle. name index. lifecycle. rollover_ alias
2021-03-22 "display login screen during recovery" can't be canceled. The appearance of lock screen interface leads to the solution that the remotely connected virtual machine can't work normally
Final review of information and network security (full version)
07 personal R & D products and promotion - human resources information management system
MySQL error reporting solution
自动答题 之 Selenium测试直接运行在浏览器中,就像真正的用户在操作一样。
Interpretation of Flink source code (II): Interpretation of jobgraph source code
MySQL Advanced (index, view, stored procedures, functions, Change password)
02 personal developed products and promotion - SMS platform
Solution qui ne peut pas être retournée après la mise à jour du navigateur Web flutter
虚拟机启动提示Probing EDD (edd=off to disable)错误
Yarn: unable to load file d:\programfiles\nodejs\yarn PS1, because running scripts is prohibited on this system
当前系统缺少NTFS格式转换器(convert.exe)
The art of Engineering (2): the transformation from general type to specific type needs to be tested for legitimacy
Example of batch update statement combining update and inner join in SQL Server
Xin'an Second Edition: Chapter 24 industrial control safety demand analysis and safety protection engineering learning notes
基于Infragistics.Document.Excel导出表格的类