Mysql优化分页
来源:互联网 发布:淘宝图片多少像素 编辑:程序博客网 时间:2024/04/30 02:52
背景:
库里面有张表,日增数据量百万条;
之前查询:
SELECT*FROM`res_battery_data_history`LIMIT 1797000,10;
优化方法1:
/*SELECT * FROM `res_battery_data_history` limit 1797000,10;*/SELECT*FROMres_battery_data_historyWHEREid >= (SELECTidFROMres_battery_data_historyLIMIT 1797000,1)LIMIT 10
优化方法2:
SELECT*FROMres_battery_data_history batteryJOIN (SELECTidFROMres_battery_data_historyLIMIT 1797000,10) temp ON battery.id = temp.id
感觉还可以;
0 0
- mysql分页limit优化
- MySQL分页优化
- Mysql的分页优化
- MySQL 优化Limit分页
- mysql分页limit 优化
- MySql分页优化
- mysql分页优化
- Mysql 笔记--分页优化
- MySql分页查询优化
- mysql 分页limit 优化
- MySQL分页优化
- mysql优化limit分页
- MySQL的分页优化
- MySQL分页性能优化
- MySql之分页优化
- 优化MySQL中的分页
- MySQL分页性能优化
- Mysql 分页优化
- [RK3399] PWM Backlight 驱动分析
- 浅析VO、DTO、DO、PO的概念、区别和用处
- 第六篇 zabbix创建主机群组
- 为什么开通CSDN博客?
- create table #temptable 临时表 和 declare @bianliang table ()表变量
- Mysql优化分页
- MySQL运行状态show status详解
- 集合基础
- js中对方法的调用,是否需要加()
- 手机页面中如何创建1px宽度的间隔线
- LiveGiftShow-iOS直播弹幕效果(礼物连击)
- 圆形图片
- 【noip2016集训总结】
- 进程与线程及其区别