当前位置:网站首页>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
在网上找了一些解决方案,但大多数不符合情况以及没有效果,请各位帮忙看一下
边栏推荐
- MySQL advanced (index, view, stored procedure, function, password modification)
- 【ASM】字节码操作 ClassWriter 类介绍与使用
- 02个人研发的产品及推广-短信平台
- Selenium test of automatic answer runs directly in the browser, just like real users.
- 面试突击63:MySQL 中如何去重?
- MySQL error reporting solution
- Uipath browser performs actions in the new tab
- 分布式不来点网关都说不过去
- [reverse] repair IAT and close ASLR after shelling
- 分布式(一致性协议)之领导人选举( DotNext.Net.Cluster 实现Raft 选举 )
猜你喜欢
Basic configuration and use of spark
Flink parsing (IV): recovery mechanism
Deploy flask project based on LNMP
Pyspark operator processing spatial data full parsing (5): how to use spatial operation interface in pyspark
EasyCVR电子地图中设备播放器loading样式的居中对齐优化
07个人研发的产品及推广-人力资源信息管理系统
【MySQL入门】第三话 · MySQL中常见的数据类型
Start job: operation returned an invalid status code 'badrequst' or 'forbidden‘
Sqoop I have everything you want
FlutterWeb浏览器刷新后无法回退的解决方案
随机推荐
The solution to the left-right sliding conflict caused by nesting Baidu MapView in the fragment of viewpager
[ciscn 2021 South China]rsa writeup
Chrome prompts the solution of "your company management" (the startup page is bound to the company's official website and cannot be modified)
轻量级计划服务工具研发与实践
Zen integration nails, bugs, needs, etc. are reminded by nails
FlutterWeb浏览器刷新后无法回退的解决方案
pip install pyodbc : ERROR: Command errored out with exit status 1
BearPi-HM_ Nano development environment
Unity小技巧 - 绘制瞄准准心
Development and practice of lightweight planning service tools
Spark calculation operator and some small details in liunx
Application service configurator (regular, database backup, file backup, remote backup)
Pyspark operator processing spatial data full parsing (4): let's talk about spatial operations first
CTF reverse entry question - dice
当前系统缺少NTFS格式转换器(convert.exe)
06 products and promotion developed by individuals - code statistical tools
Solrcloud related commands
TCP连接不止用TCP协议沟通
Essai de pénétration du Code à distance - essai du module b
沉淀下来的数据库操作类-C#版(SQL Server)