- 浏览: 238705 次
最新评论
---定期清理脚本
0 1 * * 4 root /root/qingli_mysql.sh
[root@newmysql5 ~]# cat qingli_mysql.sh
#!/bin/bash
date=`date +"%Y-%m-%d %H:%M:%S"`
echo $date >>/root/qingli.log
tables=$(mysql -u root -p"tina" 2>/dev/null -e "select concat(table_schema,'.',table_name) from information_schema.tables where data_free>0 and engine !='MEMORY';" |grep -v "concat")
for table in $tables
do
mysql -u root -p"****" 2>/dev/null -e "optimize table $table;" >>/root/qingli.log
done
----
1、清理mysql碎片
查询存在碎片的表和碎片的大小:
mysql>select concat('optimize table ',table_schema,'.',table_name,';'),data_free,engine from information_schema.tables where data_free>0 and engine !='MEMORY';
+-----------------------------------------------------------+-----------+--------+
| concat('optimize table ',table_schema,'.',table_name,';') | data_free | engine |
+-----------------------------------------------------------+-----------+--------+
| optimize table 117demo.scan_url; | 5242880 | InnoDB |
| optimize table antiyfeature.basic_csv_file; | 4194304 | InnoDB |
| optimize table antiyfeature.gen_avl_entry; | 4194304 | InnoDB |
| optimize table antiyfeature.sample_info; | 4194304 | InnoDB |
| optimize table avlyun_googleplay.app_package; | 7340032 | InnoDB |
| optimize table avlyun_googleplay.app_update; | 376438784 | InnoDB |
| optimize table enginedn.ads_opc_avl; | 4194304 | InnoDB |
| optimize table enginedn.avl_info; | 4194304 | InnoDB |
| optimize table enginedn.basic_avl_info; | 4194304 | InnoDB |
| optimize table enginedn.basic_csv_file; | 4194304 | InnoDB |
| optimize table enginedn.gen_change_record; | 4194304 | InnoDB |
| optimize table enginedn.opc_avl_info; | 4194304 | InnoDB |
| optimize table enginedn.package_channel; | 4194304 | InnoDB |
| optimize table enginedn.package_info; | 4194304 | InnoDB |
| optimize table enginedn.scdf_avl_info; | 4194304 | InnoDB |
| optimize table enginedn.sign_avl_info; | 4194304 | InnoDB |
| optimize table mobile_event.program_url; | 4194304 | InnoDB |
| optimize table mobile_event.sample; | 4194304 | InnoDB |
| optimize table mobile_event.sample_url; | 4194304 | InnoDB |
| optimize table mobile_event.virus_url; | 4194304 | InnoDB |
| optimize table mysql.innodb_index_stats; | 4194304 | InnoDB |
| optimize table sohu.detail_sohu; | 7340032 | InnoDB |
+-----------------------------------------------------------+-----------+--------+
23 rows in set (0.13 sec) --共有39个表有碎片,较小的已经提前清理,剩下的需要在空闲时间清理,预计耗时1h30min,可放在凌晨执行~
清理步骤:
执行命令optimize table table_name;
注意:OPTIMIZE TABLE只对MyISAM, BDB和InnoDB表起作用。在OPTIMIZE TABLE运行过程中,MySQL会锁定表。
即使您对可变长度的行进行了大量的更新,您也不需要经常运行,每周一次或每月一次即可,只对特定的表运行。
| optimize table antiy_bbs.bbs_common_session; | 2492 | MEMORY | --不支持这种格式
mysql> optimize table antiy_bbs.bbs_common_session;
+------------------------------+----------+----------+-----------------------------------------------------------+
| Table | Op | Msg_type | Msg_text |
+------------------------------+----------+----------+-----------------------------------------------------------+
| antiy_bbs.bbs_common_session | optimize | note | The storage engine for the table doesn't support optimize |
+------------------------------+----------+----------+-----------------------------------------------------------+
| optimize table sohu.basic_sohu; | 3145728 | InnoDB | --3M耗时2min47s
--出现这种,就表示已经清理了
mysql> optimize table antiy_bbs.bbs_ucenter_newpm;
+-----------------------------+----------+----------+-----------------------------+
| Table | Op | Msg_type | Msg_text |
+-----------------------------+----------+----------+-----------------------------+
| antiy_bbs.bbs_ucenter_newpm | optimize | status | Table is already up to date |
+-----------------------------+----------+----------+-----------------------------+
1 row in set (0.25 sec)
MYSQL的文档说明了,当INNODB时,MYSQL会以ALTER TABLE去执行这个命令。 所以最终还是会看到 OK 的状态。
mysql> OPTIMIZE TABLE foo;
+----------+----------+----------+-------------------------------------------------------------------+
| Table | Op | Msg_type | Msg_text |
+----------+----------+----------+-------------------------------------------------------------------+
| test.foo | optimize | note | Table does not support optimize, doing recreate + analyze instead |
| test.foo | optimize | status | OK |
+----------+----------+----------+-------------------------------------------------------------------+
////////////////////////////////////
注意:生产上不要随便操作,因为会锁表。
mysql> show index from basic_sohu from sohu;
+------------+------------+----------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+---------------+
| Table | Non_unique | Key_name | Seq_in_index | Column_name | Collation | Cardinality | Sub_part | Packed | Null | Index_type | Comment | Index_comment |
+------------+------------+----------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+---------------+
| basic_sohu | 0 | PRIMARY | 1 | id | A | 8764 | NULL | NULL | | BTREE | | |
+------------+------------+----------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+---------------+
1 row in set (0.00 sec)
mysql中OPTIMIZE TABLE的作用 (2009-04-01 17:44:39)转载▼
标签: 杂谈 分类: 工作
1、先来看看多次删除插入操作后的表索引情况
mysql> SHOW INDEX FROM `tbl_name`;
+----------+------------+------------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+
| Table | Non_unique | Key_name | Seq_in_index | Column_name | Collation | Cardinality | Sub_part | Packed | Null | Index_type | Comment |
+----------+------------+------------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+
| tbl_name | 0 | PRIMARY | 1 | StepID | A | 1 | NULL | NULL | | BTREE | |
| tbl_name | 1 | FlowID | 1 | FlowID | A | 1 | NULL | NULL | | BTREE | |
| tbl_name | 1 | WagerCount | 1 | WagerCount | A | 1 | NULL | NULL | | BTREE | |
| tbl_name | 1 | WagerID_3 | 1 | WagerID | A | 1 | NULL | NULL | | BTREE | |
| tbl_name | 1 | WagerID_3 | 2 | StepType | A | 1 | NULL | NULL | | BTREE | |
| tbl_name | 1 | WagerID_3 | 3 | ParamResult | A | 1 | 255 | NULL | | BTREE | |
| tbl_name | 1 | StepType_2 | 1 | StepType | A | 1 | NULL | NULL | | BTREE | |
| tbl_name | 1 | StepType_2 | 2 | ParamResult | A | 1 | 255 | NULL | | BTREE | |
| tbl_name | 1 | WagerID_2 | 1 | WagerID | A | 1 | NULL | NULL | | BTREE | |
| tbl_name | 1 | WagerID_2 | 2 | StepType | A | 1 | NULL | NULL | | BTREE | |
| tbl_name | 1 | WagerID_2 | 3 | ParamResult | A | 1 | 255 | NULL | | BTREE | |
+----------+------------+------------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+
11 rows in set (0.01 sec)
2、优化表
mysql> optimize table tbl_name;
+---------------+----------+----------+----------+
| Table | Op | Msg_type | Msg_text |
+---------------+----------+----------+----------+
| test.tbl_name | optimize | status | OK |
+---------------+----------+----------+----------+
1 row in set (40.60 sec)
3、再来看看优化后的效果
mysql> SHOW INDEX FROM `tbl_name`;
+----------+------------+------------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+
| Table | Non_unique | Key_name | Seq_in_index | Column_name | Collation | Cardinality | Sub_part | Packed | Null | Index_type | Comment |
+----------+------------+------------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+
| tbl_name | 0 | PRIMARY | 1 | StepID | A | 172462 | NULL | NULL | | BTREE | |
| tbl_name | 1 | FlowID | 1 | FlowID | A | 86231 | NULL | NULL | | BTREE | |
| tbl_name | 1 | WagerCount | 1 | WagerCount | A | 4311 | NULL | NULL | | BTREE | |
| tbl_name | 1 | WagerID_3 | 1 | WagerID | A | 86231 | NULL | NULL | | BTREE | |
| tbl_name | 1 | WagerID_3 | 2 | StepType | A | 172462 | NULL | NULL | | BTREE | |
| tbl_name | 1 | WagerID_3 | 3 | ParamResult | A | 172462 | 255 | NULL | | BTREE | |
| tbl_name | 1 | StepType_2 | 1 | StepType | A | 9 | NULL | NULL | | BTREE | |
| tbl_name | 1 | StepType_2 | 2 | ParamResult | A | 86231 | 255 | NULL | | BTREE | |
| tbl_name | 1 | WagerID_2 | 1 | WagerID | A | 86231 | NULL | NULL | | BTREE | |
| tbl_name | 1 | WagerID_2 | 2 | StepType | A | 172462 | NULL | NULL | | BTREE | |
| tbl_name | 1 | WagerID_2 | 3 | ParamResult | A | 172462 | 255 | NULL | | BTREE | |
+----------+------------+------------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+
最后,来看看手册中关于 OPTIMIZE 的描述:
OPTIMIZE [LOCAL | NO_WRITE_TO_BINLOG] TABLE tbl_name [, tbl_name] ...
如果您已经删除了表的一大部分,或者如果您已经对含有可变长度行的表(含有VARCHAR, BLOB或TEXT列的表)进行了很多更改,则应使用
OPTIMIZE TABLE。被删除的记录被保持在链接清单中,后续的INSERT操作会重新使用旧的记录位置。您可以使用OPTIMIZE TABLE来重新
利用未使用的空间,并整理数据文件的碎片。
在多数的设置中,您根本不需要运行OPTIMIZE TABLE。即使您对可变长度的行进行了大量的更新,您也不需要经常运行,每周一次或每月一次
即可,只对特定的表运行。
OPTIMIZE TABLE只对MyISAM, BDB和InnoDB表起作用。
注意,在OPTIMIZE TABLE运行过程中,MySQL会锁定表。
0 1 * * 4 root /root/qingli_mysql.sh
[root@newmysql5 ~]# cat qingli_mysql.sh
#!/bin/bash
date=`date +"%Y-%m-%d %H:%M:%S"`
echo $date >>/root/qingli.log
tables=$(mysql -u root -p"tina" 2>/dev/null -e "select concat(table_schema,'.',table_name) from information_schema.tables where data_free>0 and engine !='MEMORY';" |grep -v "concat")
for table in $tables
do
mysql -u root -p"****" 2>/dev/null -e "optimize table $table;" >>/root/qingli.log
done
----
1、清理mysql碎片
查询存在碎片的表和碎片的大小:
mysql>select concat('optimize table ',table_schema,'.',table_name,';'),data_free,engine from information_schema.tables where data_free>0 and engine !='MEMORY';
+-----------------------------------------------------------+-----------+--------+
| concat('optimize table ',table_schema,'.',table_name,';') | data_free | engine |
+-----------------------------------------------------------+-----------+--------+
| optimize table 117demo.scan_url; | 5242880 | InnoDB |
| optimize table antiyfeature.basic_csv_file; | 4194304 | InnoDB |
| optimize table antiyfeature.gen_avl_entry; | 4194304 | InnoDB |
| optimize table antiyfeature.sample_info; | 4194304 | InnoDB |
| optimize table avlyun_googleplay.app_package; | 7340032 | InnoDB |
| optimize table avlyun_googleplay.app_update; | 376438784 | InnoDB |
| optimize table enginedn.ads_opc_avl; | 4194304 | InnoDB |
| optimize table enginedn.avl_info; | 4194304 | InnoDB |
| optimize table enginedn.basic_avl_info; | 4194304 | InnoDB |
| optimize table enginedn.basic_csv_file; | 4194304 | InnoDB |
| optimize table enginedn.gen_change_record; | 4194304 | InnoDB |
| optimize table enginedn.opc_avl_info; | 4194304 | InnoDB |
| optimize table enginedn.package_channel; | 4194304 | InnoDB |
| optimize table enginedn.package_info; | 4194304 | InnoDB |
| optimize table enginedn.scdf_avl_info; | 4194304 | InnoDB |
| optimize table enginedn.sign_avl_info; | 4194304 | InnoDB |
| optimize table mobile_event.program_url; | 4194304 | InnoDB |
| optimize table mobile_event.sample; | 4194304 | InnoDB |
| optimize table mobile_event.sample_url; | 4194304 | InnoDB |
| optimize table mobile_event.virus_url; | 4194304 | InnoDB |
| optimize table mysql.innodb_index_stats; | 4194304 | InnoDB |
| optimize table sohu.detail_sohu; | 7340032 | InnoDB |
+-----------------------------------------------------------+-----------+--------+
23 rows in set (0.13 sec) --共有39个表有碎片,较小的已经提前清理,剩下的需要在空闲时间清理,预计耗时1h30min,可放在凌晨执行~
清理步骤:
执行命令optimize table table_name;
注意:OPTIMIZE TABLE只对MyISAM, BDB和InnoDB表起作用。在OPTIMIZE TABLE运行过程中,MySQL会锁定表。
即使您对可变长度的行进行了大量的更新,您也不需要经常运行,每周一次或每月一次即可,只对特定的表运行。
| optimize table antiy_bbs.bbs_common_session; | 2492 | MEMORY | --不支持这种格式
mysql> optimize table antiy_bbs.bbs_common_session;
+------------------------------+----------+----------+-----------------------------------------------------------+
| Table | Op | Msg_type | Msg_text |
+------------------------------+----------+----------+-----------------------------------------------------------+
| antiy_bbs.bbs_common_session | optimize | note | The storage engine for the table doesn't support optimize |
+------------------------------+----------+----------+-----------------------------------------------------------+
| optimize table sohu.basic_sohu; | 3145728 | InnoDB | --3M耗时2min47s
--出现这种,就表示已经清理了
mysql> optimize table antiy_bbs.bbs_ucenter_newpm;
+-----------------------------+----------+----------+-----------------------------+
| Table | Op | Msg_type | Msg_text |
+-----------------------------+----------+----------+-----------------------------+
| antiy_bbs.bbs_ucenter_newpm | optimize | status | Table is already up to date |
+-----------------------------+----------+----------+-----------------------------+
1 row in set (0.25 sec)
MYSQL的文档说明了,当INNODB时,MYSQL会以ALTER TABLE去执行这个命令。 所以最终还是会看到 OK 的状态。
mysql> OPTIMIZE TABLE foo;
+----------+----------+----------+-------------------------------------------------------------------+
| Table | Op | Msg_type | Msg_text |
+----------+----------+----------+-------------------------------------------------------------------+
| test.foo | optimize | note | Table does not support optimize, doing recreate + analyze instead |
| test.foo | optimize | status | OK |
+----------+----------+----------+-------------------------------------------------------------------+
////////////////////////////////////
注意:生产上不要随便操作,因为会锁表。
mysql> show index from basic_sohu from sohu;
+------------+------------+----------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+---------------+
| Table | Non_unique | Key_name | Seq_in_index | Column_name | Collation | Cardinality | Sub_part | Packed | Null | Index_type | Comment | Index_comment |
+------------+------------+----------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+---------------+
| basic_sohu | 0 | PRIMARY | 1 | id | A | 8764 | NULL | NULL | | BTREE | | |
+------------+------------+----------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+---------------+
1 row in set (0.00 sec)
mysql中OPTIMIZE TABLE的作用 (2009-04-01 17:44:39)转载▼
标签: 杂谈 分类: 工作
1、先来看看多次删除插入操作后的表索引情况
mysql> SHOW INDEX FROM `tbl_name`;
+----------+------------+------------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+
| Table | Non_unique | Key_name | Seq_in_index | Column_name | Collation | Cardinality | Sub_part | Packed | Null | Index_type | Comment |
+----------+------------+------------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+
| tbl_name | 0 | PRIMARY | 1 | StepID | A | 1 | NULL | NULL | | BTREE | |
| tbl_name | 1 | FlowID | 1 | FlowID | A | 1 | NULL | NULL | | BTREE | |
| tbl_name | 1 | WagerCount | 1 | WagerCount | A | 1 | NULL | NULL | | BTREE | |
| tbl_name | 1 | WagerID_3 | 1 | WagerID | A | 1 | NULL | NULL | | BTREE | |
| tbl_name | 1 | WagerID_3 | 2 | StepType | A | 1 | NULL | NULL | | BTREE | |
| tbl_name | 1 | WagerID_3 | 3 | ParamResult | A | 1 | 255 | NULL | | BTREE | |
| tbl_name | 1 | StepType_2 | 1 | StepType | A | 1 | NULL | NULL | | BTREE | |
| tbl_name | 1 | StepType_2 | 2 | ParamResult | A | 1 | 255 | NULL | | BTREE | |
| tbl_name | 1 | WagerID_2 | 1 | WagerID | A | 1 | NULL | NULL | | BTREE | |
| tbl_name | 1 | WagerID_2 | 2 | StepType | A | 1 | NULL | NULL | | BTREE | |
| tbl_name | 1 | WagerID_2 | 3 | ParamResult | A | 1 | 255 | NULL | | BTREE | |
+----------+------------+------------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+
11 rows in set (0.01 sec)
2、优化表
mysql> optimize table tbl_name;
+---------------+----------+----------+----------+
| Table | Op | Msg_type | Msg_text |
+---------------+----------+----------+----------+
| test.tbl_name | optimize | status | OK |
+---------------+----------+----------+----------+
1 row in set (40.60 sec)
3、再来看看优化后的效果
mysql> SHOW INDEX FROM `tbl_name`;
+----------+------------+------------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+
| Table | Non_unique | Key_name | Seq_in_index | Column_name | Collation | Cardinality | Sub_part | Packed | Null | Index_type | Comment |
+----------+------------+------------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+
| tbl_name | 0 | PRIMARY | 1 | StepID | A | 172462 | NULL | NULL | | BTREE | |
| tbl_name | 1 | FlowID | 1 | FlowID | A | 86231 | NULL | NULL | | BTREE | |
| tbl_name | 1 | WagerCount | 1 | WagerCount | A | 4311 | NULL | NULL | | BTREE | |
| tbl_name | 1 | WagerID_3 | 1 | WagerID | A | 86231 | NULL | NULL | | BTREE | |
| tbl_name | 1 | WagerID_3 | 2 | StepType | A | 172462 | NULL | NULL | | BTREE | |
| tbl_name | 1 | WagerID_3 | 3 | ParamResult | A | 172462 | 255 | NULL | | BTREE | |
| tbl_name | 1 | StepType_2 | 1 | StepType | A | 9 | NULL | NULL | | BTREE | |
| tbl_name | 1 | StepType_2 | 2 | ParamResult | A | 86231 | 255 | NULL | | BTREE | |
| tbl_name | 1 | WagerID_2 | 1 | WagerID | A | 86231 | NULL | NULL | | BTREE | |
| tbl_name | 1 | WagerID_2 | 2 | StepType | A | 172462 | NULL | NULL | | BTREE | |
| tbl_name | 1 | WagerID_2 | 3 | ParamResult | A | 172462 | 255 | NULL | | BTREE | |
+----------+------------+------------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+
最后,来看看手册中关于 OPTIMIZE 的描述:
OPTIMIZE [LOCAL | NO_WRITE_TO_BINLOG] TABLE tbl_name [, tbl_name] ...
如果您已经删除了表的一大部分,或者如果您已经对含有可变长度行的表(含有VARCHAR, BLOB或TEXT列的表)进行了很多更改,则应使用
OPTIMIZE TABLE。被删除的记录被保持在链接清单中,后续的INSERT操作会重新使用旧的记录位置。您可以使用OPTIMIZE TABLE来重新
利用未使用的空间,并整理数据文件的碎片。
在多数的设置中,您根本不需要运行OPTIMIZE TABLE。即使您对可变长度的行进行了大量的更新,您也不需要经常运行,每周一次或每月一次
即可,只对特定的表运行。
OPTIMIZE TABLE只对MyISAM, BDB和InnoDB表起作用。
注意,在OPTIMIZE TABLE运行过程中,MySQL会锁定表。
发表评论
-
mysql设置外键约束on delete cascade on update cascade
2016-12-09 16:27 3666mysql设置外键约束on delet ... -
mysql权限管理(实例)
2016-05-10 17:21 1484mysql权限管理实例 本文并没有很详细的介绍对具体的对象授 ... -
mysql简单的碎片清理脚本
2016-05-10 16:52 1461mysql简单的碎片清理脚本 #!/bin/bash date ... -
mysql qpress压缩备份恢复
2016-05-03 16:30 6798说明: 1.前面博客已经介绍过gzip压缩方法,备份正常,但后 ... -
mysql xtrabackup在线搭建主从
2016-04-11 14:59 1887使用xtrabackup进行在线的主从搭建: [root@m ... -
mysql xtrabackup在线备份还原(全备+增备)
2016-04-11 14:47 1007工具安装: [root@mysqlserver var]# t ... -
mysql主库清理数据,从库保留
2016-04-01 15:26 1253因为业务需要,想在mysql主库清理一些数据,但从库想要保留, ... -
oracle,postgresql,mysql一些使用上的区别记录
2015-12-16 11:38 01.限制行数: select * from ta where ... -
数据库调优分享-mysql
2015-12-16 10:02 921数据库调优分享------参考一本mysql资料书 日常的困 ... -
mysql 安装-tina
2015-12-08 17:32 0mysql安装-tina 1、准备安装程序(http://ww ... -
mysqldump 只导入数据或只导结构
2015-12-22 10:36 2680[size=small]mysqldump只导出数据或只导出表 ... -
mysql server has gone away
2015-12-10 09:26 837mysql server has gone away,他的意思 ... -
mysql binlog
2015-12-10 09:26 1320mysqld在每个二进制日志 ... -
mysql远程连接设置
2015-12-10 09:25 972远程连接mysql数据库: 连接上以后,通过这台跳转服务器远 ... -
Last_SQL_Error: Error 'Duplicate entry '1' for key 'PRIMARY''
2015-12-10 09:25 1684[size=small]-实际遇到的问题: Last_SQL ... -
[ERROR] Slave I/O: error connecting to master
2015-12-09 09:26 8068刚配置的MySQL主从,在从机上看到 点击(此处)折叠或打开 ... -
MySQL常用函数
2015-02-05 10:34 502一、字符串类 1、left(str, length) 从左开始 ... -
MySQL触发器简介
2015-02-05 10:33 864一、触发器基本语法 CREATE TRIGGER trigge ... -
MySQL主从切换
2015-02-05 10:32 465环境: 原主库:192.168.10.197 ---新 ... -
MySQL主从搭建
2015-02-05 10:31 753环境简介 master(主):192.168.12.101 s ...
相关推荐
大量删除数据必然会在数据文件中造成不连续的空白空间,而当插入数据时,这些空白空间则会被利用起来 。对于不同的存储引擎整理碎片的方式不一样。...因为在中间删除,所以留下了空白mysql> optimize table
本篇文章是对Mysql中OPTIMIZE TABLE的作用进行了详细的分析介绍,需要的朋友参考下
mysql-optimize 1.对查询进行优化,应尽量避免全表扫描,首先应考虑在 where 及 order by 涉及的列上建立索引。 2.应尽量避免在 where 子句中对字段进行 null 值判断,否则将导致引擎放弃使用索引而进行全表扫描, ...
WordPress上每次新建页面或文章时,有时免不了要修改这些页面的内容,假如你多次修改文章,那么,WordPress就会产生一些冗余的数据,就会占据你的MySQL空间,例如:你的一篇文章占用100KB数据库空间,你修改5次的话...
7.6 DROP DATABASE (抛弃数据库)句法 7.7 CREATE TABLE (创建表)句法 7.7.1 隐含(silent)的列指定变化 7.8 ALTER TABLE (改变表)句法 7.9 OPTIMIZE TABLE (优化表) 句法 7.10 DROP TABLE ...
7.9 OPTIMIZE TABLE (优化表) 句法 7.10 DROP TABLE (抛弃表)句法 7.11 DELETE (删除)句法 7.12 SELECT (精选)句法 7.13 JOIN (联接)句法 7.14 INSERT (插入)句法 7.15 REPLACE ...
System Optimize Tools V1.0.1 System Optimize Tools V1.0.1 System Optimize Tools V1.0.1 System Optimize Tools V1.0.1 System Optimize Tools V1.0.1 System Optimize Tools V1.0.1 System Optimize Tools V...
本文介绍mysql定时批量检查表repair和优化表optimize table的shell脚本,对于MySQL数据库的定期维护相当有用!如下所示: #!/bin/bash host_name=192.168.0.123 user_name=jincon.com user_pwd=jincon.com database...
This guide explores how to tune and optimize the MySQL Cluster database to handle diverse workload requirements. It discusses data access patterns and how to build distribution awareness into ...
* 1 MySQL的一般的信息 o 1.1 什么是MySQL? o 1.2 关于本手册 + 1.2.1 本手册中使用的约定 o 1.3 MySQL的历史 o 1.4 MySQL的主要特征 o 1.5 MySQL稳定性? o 1.6 顺应2000年 o 1.7 SQL一般信息和教程 o ...
随着mysql的长期使用,肯定会出现一些问题,一般情况下mysql表无法访问,就可以修复表了,优化时减少磁盘占用空间。方便备份。
The tool helps you detect problems and optimize SQL queries via GUI. Profiler: Offers visual query profiling Compares profiling results More on query profiling Report and Analysis Data ...
Along the way, you will learn to monitor your cluster, make decisions about schema design, implement geographic replication, troubleshoot and optimize performance, and much more. This book covers ...
SSD Optimize v1.1 Build 823. SSD盘优化工具
Optimize advanced querying features, such as full-text searches Take advantage of modern multi-core CPUs and solid-state disks Explore backup and recovery strategies—including new tools for hot on...
Laravel开发-laravel-optimize-images Laravel 4的优化图像命令
前端开源库-node-optimize节点优化,将一个节点项目优化为一个JS文件,以供发布。