当前位置:网站首页>Mysql比较
Mysql比较
2022-06-11 09:28:00 【宇1990】
sql优化:https://www.cnblogs.com/lonnie/p/8320095.html
1、当数据库统计一天的数据但是数据库字段存的是datatime类型的时候(当然最好是直接使用data日期类型)
where语句当中使用data_format和like的时间区别(原则最好在where语句的右边最好不要有函数计算同时也不要使用like这样会造成遍历全表 )确实要使用的时候 同样的表 数据5855603条数据的时候
select * from dobi_core.t6027
where F06 like '2019-08-31%'执行多次一般在8s左右
select * from dobi_core.t6027
where date_format( F06 ,'%Y-%m-%d') = '2019-08-31'而使用计算的时候一般需要9.5s左右
select * from dobi_core.t6027 where F06 >= '2019-08-31 00:00:00' and F06 < '2019-09-01 00:00:00'执行如上耗时间一般在8.5s左右
综上当使用日期统计时,最后还是用上述方式
边栏推荐
- JS foundation -- about DOM
- Opencv image basic operation (IV) -- image feature extraction (corner detection)
- Events in JS
- Ora-00059 exceeds DB_ Files limit
- ESP8266_MQTT协议
- 2161. divide the array according to the given number
- 我们是如何连上WiFi的?
- [TiO websocket] IV. the TiO websocket server implements the custom cluster mode
- 报错Version mismatch between installed depthai lib and the required one by the scrip.
- [TiO websocket] v. TiO websocket server counts the number of online people
猜你喜欢

Oracle XDB组件的重建

ESP8266_MQTT协议

CVPR 2021: learning continuous image representation with local implicit image function

MSF SMB based information collection

RAC单独修改scanip到不同网段时会报错

考研数学 【数列极限证明题】题型方法总结

Ora-00059 exceeds DB_ Files limit

全局池化–Pytorch

rac expdp导出时报错:ORA-31693、ORA-31617、ORA-19505

Opencv image basic operation (IV) -- image feature extraction (corner detection)
随机推荐
Troubleshooting the error ora-12545 reported by scanip in Oracle RAC
Where is it safer to open an account for soda ash futures? How much does it cost to buy at least one hand?
Openstack explanation (22) -- neutron plug-in configuration
Document object
Remote office related issues to be considered by enterprises
document对象
Method (common method), method execution memory analysis, method overloading mechanism, method recursion
ESP8266_通过MQTT协议连接阿里云
Type-C Bluetooth speaker single port rechargeable OTG solution
ESP8266_SmartConfig
Shandong University project training (IV) -- wechat applet scans web QR code to realize web login
Concurrent programming
Use of MSF evaluation module
Opencv image basic operation (III) -- image feature extraction (corner detection)
[TiO websocket] IV. the TiO websocket server implements the custom cluster mode
关于CI框架批量导出至压缩文件
The first TOF related data set available for deep learning: deep learning for confidence information in stereo and TOF data fusion (iccv 2017)
Control statement if switch for while while break continue
A summary of the problem type and method for proving the limit of sequence in postgraduate entrance examination
POJ3250「Bad Hair Day」