Home > Database > Mysql Tutorial > body text

跟着hsp一步步学mysql优化的方法_MySQL

WBOY
Release: 2016-06-01 13:24:07
Original
973 people have browsed it

bitsCN.com

在第二集中

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


bitsCN.com
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!