2014年(42)
发布时间:2014-06-07 14:06:44
-- 收缩innodb存储引擎表的空间大小:delete 了6000W日志表记录,但是表占据的文件大小一直没有变化。后来,找到一招:alter table xxxx engine=innodb;搞定,而且速度很很快。mysql> alter table order_action engine=innodb;Query OK, 0 rows affected (0.62 sec)Records: 0 Duplicates: 0 Warning.........【阅读全文】
发布时间:2014-06-07 14:06:44
DROP PROCEDURE IF EXISTS test.t1 $$ DELIMITER $$ CREATE PROCEDURE t1() BEGIN SET autocommit=0; DECLARE cnt INT DEFAULT 0; -- it is wrong order WHILE cnt <= 10000 DO &n.........【阅读全文】
发布时间:2014-06-07 14:06:44
0 reference network:http://blog.csdn.net/hguisu/article/details/7349562http://blog.chinaunix.net/uid-28437434-id-3471237.htmlhttp://mysql-mmm.org/downloads ; http://mysql-mmm.org/mmm2:guide http://dev.mysql.com/doc/internals/en/optimizer-primary-optimizations.html 1 install mysql2. Basic con.........【阅读全文】
发布时间:2014-06-07 14:06:44
mysql --default-character-set=utf8 -e "SELECT CONCAT('show grants for ''',USER,'''@''',HOST,''';') as gsql FROM mysql.user WHERE USER NOT IN('','root');" > g1.log;sed -i '1d' g1.log# sed 's/gsql//g' g1.log > g2.log;> g3.sql;sed -n '2,$p' g1.log|while read vardo #cnt=(.........【阅读全文】