![](https://img-blog.csdnimg.cn/20201014180756923.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
mysql
白礼军
这个作者很懒,什么都没留下…
展开
-
MySQL数据库的优化方法
1、选取最适用的字段属性 MySQL可以很好的支持大数据量的存取,但是一般说来,数据库中的表越小,在它上面执行的查询也就会越快。因此,在创建表的时候,为了获得更好的性能,我们可以将表中字段的宽度设得尽可能小。 例如,在定义邮政编码这个字段时,如果将其设置为CHAR(255),显然给数据库增加了不必要的空间,甚至使用VARCHAR这种类型也是多余的,因为CHAR(6)就可以很好的完成任务了。同样的,...转载 2019-07-20 21:06:18 · 83 阅读 · 0 评论 -
解决Mysql8 报错:ERROR 1193 (HY000): Unknown system variable 'tx_isolation'
报错:Loading class com.mysql.jdbc.Driver'. This is deprecated. The new driver class iscom.mysql.cj.jdbc.Driver’. The driver is automatically registered via the SPI and manual loading of the driver class...原创 2019-09-04 16:56:52 · 2620 阅读 · 0 评论 -
Mysql 时间操作(当天,昨天,7天,30天,半年,全年,季度)
-- 1 、 查看当天日期 select current_date(); -- 2、 查看当天时间 select current_time(); -- 3、查看当天时间日期 select current_timestamp(); -- 4、查询当天记录 select * from 表名 where to_days(时间字段名) = to_days(now()); -- 5、查询昨天...原创 2019-09-30 12:51:34 · 461 阅读 · 1 评论