跟着hsp一步步学mysql优化的方法
在第二集中
1.show status like 'Com%' 等价于show status session like 'Com%'百年--显示当前控制台情况
show global status like 'Com%'--显示数据库从启动到查询次数show session status like 'Com_select';
show status like 'uptime' -- 已启动多久
show status like 'Connections' --连接的次数
slow_queries慢查询的次数(默认是10)
对于Myisam数据库,要定时清理的。
optimize table 表名,否则其删除纪录并未清空
order by null禁用排序
用join来代替子查询
在财务中,可以使用定点数来放数据decimal,不要使用期float,因为float会丢数据。如float(10,5),
日期类型中,用数值,而不用datastmp
相关文章
MySQL安装服务时提示:Install/Remove of the Service Denied解决
今天给新电脑安装了mysql,本来好好的,却报了个bug,就记录下吧,这篇文章主要给大家介绍了关于MySQL安装服务时提示:Install/Remove of the Service Denied的解决办法,需要的朋友可以参考下2023-03-03解决MySQL报错:You can‘t specify target table ‘region‘ for
这篇文章主要给大家介绍了关于MySQL报错:You can‘t specify target table ‘region‘ for update in FROM clause的相关资料,文中通过实例代码介绍的非常详细,需要的朋友可以参考下2023-02-02Linux上通过binlog文件恢复mysql数据库详细步骤
binglog文件是服务器的二进制日志记录着该数据库的所有增删改的操作日志,接下来通过本文给大家介绍linux上通过binlog文件恢复mysql数据库详细步骤,非常不错,需要的朋友参考下2016-08-08mysql数据库中的information_schema和mysql可以删除吗?
这篇文章主要介绍了mysql数据库中的information_schema和mysql可以删除吗这个问题,需要的朋友可以参考下2014-05-05
最新评论