当前位置:网站首页>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


在网上找了一些解决方案,但大多数不符合情况以及没有效果,请各位帮忙看一下
边栏推荐
- The most complete tcpdump and Wireshark packet capturing practice in the whole network
- 【ASM】字节码操作 ClassWriter 类介绍与使用
- Hongmeng introduction and development environment construction
- [ASM] introduction and use of bytecode operation classwriter class
- Spark accumulator and broadcast variables and beginners of sparksql
- Flink parsing (V): state and state backend
- Virtual machine startup prompt probing EDD (edd=off to disable) error
- PySpark算子处理空间数据全解析(4): 先说说空间运算
- Integrated development management platform
- Yarn: unable to load file d:\programfiles\nodejs\yarn PS1, because running scripts is prohibited on this system
猜你喜欢

面试突击63:MySQL 中如何去重?

06 products and promotion developed by individuals - code statistical tools

TCP连接不止用TCP协议沟通

Virtual machine startup prompt probing EDD (edd=off to disable) error

当前系统缺少NTFS格式转换器(convert.exe)

Re signal writeup

Kali2021 installation and basic configuration

07 personal R & D products and promotion - human resources information management system

Wordcloud colormap color set and custom colors

视频融合云平台EasyCVR增加多级分组,可灵活管理接入设备
随机推荐
TCP connection is more than communicating with TCP protocol
C WinForm series button easy to use
[introduction to MySQL] third, common data types in MySQL
PySpark算子处理空间数据全解析(4): 先说说空间运算
灵活报表v1.0(简单版)
The most complete tcpdump and Wireshark packet capturing practice in the whole network
自动化运维利器-Ansible-Playbook
Debug and run the first xv6 program
Spark calculation operator and some small details in liunx
微信小程序获取手机号
Yarn: unable to load file d:\programfiles\nodejs\yarn PS1, because running scripts is prohibited on this system
分布式不来点网关都说不过去
自动答题 之 Selenium测试直接运行在浏览器中,就像真正的用户在操作一样。
05 personal R & D products and promotion - data synchronization tool
Single responsibility principle
Establishment of graphical monitoring grafana
03个人研发的产品及推广-计划服务配置器V3.0
Solr appears write Lock, solrexception: could not get leader props in the log
pip install pyodbc : ERROR: Command errored out with exit status 1
C# WinForm中DataGridView单元格显示图片