はてな記法とかだいたい忘れた
http://anison.moe.hm/
運用期間は半年くらい。
データファイルがでっかくなっちゃった!
[root@youpandora mysql]# ls -l 合計 5348528 drwx------ 2 mysql mysql 4096 6月 11 19:17 anitare -rw-rw---- 1 mysql mysql 134217728 10月 9 16:08 ib_logfile0 -rw-rw---- 1 mysql mysql 134217728 10月 9 16:08 ib_logfile1 -rw-r----- 1 mysql mysql 5203034112 10月 9 16:08 ibdata1 drwx------ 2 mysql mysql 4096 4月 28 10:08 mysql srwxrwxrwx 1 mysql mysql 0 10月 9 15:04 mysql.sock -rw-r--r-- 1 root root 6 4月 28 10:08 mysql_upgrade_info drwx------ 2 mysql mysql 4096 2月 17 2010 phpmyadmin drwx------ 2 mysql mysql 4096 2月 17 2010 test
5G近くありますね^^
mysql> show table status; +------------------+--------+---------+------------+----------+----------------+-------------+-----------------+--------------+-----------+ | Name | Engine | Version | Row_format | Rows | Avg_row_length | Data_length | Max_data_length | Index_length | Data_free | +------------------+--------+---------+------------+----------+----------------+-------------+-----------------+--------------+-----------+ | listener_history | InnoDB | 10 | Compact | 24683429 | 75 | 1855979520 | 0 | 3184492544 | 39845888 | | servers | InnoDB | 10 | Compact | 19 | 862 | 16384 | 0 | 0 | 39845888 | | song_history | InnoDB | 10 | Compact | 147162 | 139 | 20496384 | 0 | 31145984 | 39845888 | | streams | InnoDB | 10 | Compact | 31 | 528 | 16384 | 0 | 0 | 39845888 | | v_streams | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | +------------------+--------+---------+------------+----------+----------------+-------------+-----------------+--------------+-----------+ 5 rows in set, 1 warning (0.86 sec)
へっへっへっへ…
mysql> OPTIMIZE TABLE listener_history;
途中経過
motchang@youpandora 16:30:37 土 10月 09 job(s):0 wd:/var/lib/mysql bash-3.2 $ ls -l 合計 9325532 drwx------ 2 mysql mysql 4096 10月 9 16:16 anitare -rw-rw---- 1 mysql mysql 134217728 10月 9 16:31 ib_logfile0 -rw-rw---- 1 mysql mysql 134217728 10月 9 16:31 ib_logfile1 -rw-r----- 1 mysql mysql 9271508992 10月 9 16:31 ibdata1 drwx------ 2 mysql mysql 4096 4月 28 10:08 mysql srwxrwxrwx 1 mysql mysql 0 10月 9 15:04 mysql.sock -rw-r--r-- 1 root root 6 4月 28 10:08 mysql_upgrade_info drwx------ 2 mysql mysql 4096 2月 17 2010 phpmyadmin drwx------ 2 mysql mysql 4096 2月 17 2010 test
なんか膨らんでる…
テーレッテレー(ねるねるねるね)
motchang@youpandora 16:37:52 土 10月 09 job(s):0 wd:/var/lib/mysql bash-3.2 $ ls -l 合計 10309532 drwx------ 2 mysql mysql 4096 10月 9 16:35 anitare -rw-rw---- 1 mysql mysql 134217728 10月 9 16:37 ib_logfile0 -rw-rw---- 1 mysql mysql 134217728 10月 9 16:35 ib_logfile1 -rw-r----- 1 mysql mysql 10278141952 10月 9 16:37 ibdata1 drwx------ 2 mysql mysql 4096 4月 28 10:08 mysql srwxrwxrwx 1 mysql mysql 0 10月 9 15:04 mysql.sock -rw-r--r-- 1 root root 6 4月 28 10:08 mysql_upgrade_info drwx------ 2 mysql mysql 4096 2月 17 2010 phpmyadmin drwx------ 2 mysql mysql 4096 2月 17 2010 test
えっ?
mysql> show table status; +------------------+--------+---------+------------+----------+----------------+-------------+-----------------+--------------+------------+ | Name | Engine | Version | Row_format | Rows | Avg_row_length | Data_length | Max_data_length | Index_length | Data_free | +------------------+--------+---------+------------+----------+----------------+-------------+-----------------+--------------+------------+ | listener_history | InnoDB | 10 | Compact | 24656245 | 75 | 1855979520 | 0 | 3183443968 | 5045747712 | | servers | InnoDB | 10 | Compact | 19 | 862 | 16384 | 0 | 0 | 5045747712 | | song_history | InnoDB | 10 | Compact | 142109 | 144 | 20496384 | 0 | 31145984 | 5045747712 | | streams | InnoDB | 10 | Compact | 31 | 528 | 16384 | 0 | 0 | 5045747712 | | v_streams | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | +------------------+--------+---------+------------+----------+----------------+-------------+-----------------+--------------+------------+ 5 rows in set, 1 warning (0.82 sec)
Data_freeが増えるんだ。ふーん。
ディスクを圧迫するとは思わなかったZE☆