当前位置:网站首页>MySQL comparison
MySQL comparison
2022-06-11 10:12:00 【Yu 1990】
sql Optimize :https://www.cnblogs.com/lonnie/p/8320095.html
1、 When the database counts the data of a day, but the database fields are stored datatime When it comes to type ( Of course, it is better to use it directly data The date type )
where Use... In sentences data_format and like The time difference ( The principle is better in where It is better not to have function calculation on the right side of the statement, and also not to use like This will cause traversal of the entire table ) When you really want to use it The same watch data 5855603 When you have data
select * from dobi_core.t6027
where F06 like '2019-08-31%'Execute multiple times, usually in 8s about
select * from dobi_core.t6027
where date_format( F06 ,'%Y-%m-%d') = '2019-08-31'And when using calculation, it usually needs 9.5s about
select * from dobi_core.t6027 where F06 >= '2019-08-31 00:00:00' and F06 < '2019-09-01 00:00:00'Execution of the above takes time, usually in 8.5s about
When using date statistics , Finally, use the above method
边栏推荐
- An error can't locate env pm in @INC
- LoRa模块无线收发通信技术详解
- New feature of ES6 - arrow function
- Interview review - closure
- 浅谈wandfluh比例阀的功能与作用
- What hydraulic oil is used for Denison hydraulic pump? What are the requirements
- Es6新特性——箭头函数
- Handwritten code call, apply, bind
- Empire CMS imitates DIY handmade website source code of craft activity /92kaifa imitates self-adaptive mobile phone version template of craft activity
- 吴恩达机器学习课程-第七周
猜你喜欢

An error can't locate env pm in @INC

Chemical composition of q355hr steel plate

【Objective-C】‘NSAutoreleasePool‘ is unavailable: not available in automatic reference counting mode

ESP8266_ SNTP(Simple Network Time Protocol)

No more! The entry byte beat for a week and ran decisively.

吴恩达机器学习课程-第七周

What are the differences between Parker pilot solenoid valve and direct acting solenoid valve?

不同CV任务的标注类型

Mysql-- index

Picture rule page turning
随机推荐
Inductive bias的一些理解
MD5学习
有哪些ABAP关键字和语法,到了ABAP云环境上就没办法用了?
EMG线性光源发射器有哪些功能和特点呢?
What are the application fields of MAG gear pump? To sum up
Technology cloud report: privacy computing under the wave of Web3.0
puppeteer入门之 Puppeteer 类
No more! The entry byte beat for a week and ran decisively.
数据一致的问题
Beginning简约博客emlog主题模板V3
Q1 revenue exceeded expectations. Why did man Bang win headwind growth?
动态渲染数据和轮播图
利用PHP开发的一款万能、表白墙系统部分代码片段
Tenthousand words thoroughly learn heap and binary tree
Understanding polymorphism?
rpc的正确打开方式|读懂Go原生net/rpc包
What are the functions and features of EMG linear light emitter?
Override and reload?
你对软件兼容性测试知道多少?如何选择软件兼容性测试机构?
What are the functions and functions of the EMG actuator