Changes between Version 105 and Version 106 of jazz/Trac_Updates


Ignore:
Timestamp:
Apr 24, 2016, 11:54:52 PM (8 years ago)
Author:
jazz
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • jazz/Trac_Updates

    v105 v106  
    16691669Do you want to continue [Y/n]?
    16701670}}}
     1671
     1672= 2016-04-24 =
     1673
     1674 * 例行安全升級
     1675 * 今天偶然在 http://2014.hadoopcon.org 後台發現高達數萬則「迴響」(comments),根據幫友人處理的經驗,直接清除 wordpress 資料庫中的 wp_comments 最快。
     1676 * 接著,參考了幾篇文章進行 MySQL 資料庫的最佳化(Optimization):
     1677   * [https://blog.longwin.com.tw/2012/03/mysql-myisam-innodb-optimize-2012/ MySQL 對 MyISAM、InnoDB 使用 Optimize Table]
     1678   * [http://meinit.nl/optimize-only-fragmented-tables-mysql Optimize only fragmented tables in MySQL]
     1679   * http://stackoverflow.com/questions/5474662/mysql-optimize-all-tables
     1680 * 學著用幾個工具:
     1681   * '''mysqlcheck'''
     1682     * `-o` : 作 Optimization
     1683     * `-A` : 針對所有的資料庫、資料表
     1684     * `-u` : 指定 MySQL 使用者
     1685     * `-p` : 詢問密碼
     1686{{{
     1687~$ mysqlcheck -o -A -u root -p
     1688Enter password:
     1689hadoopcon.wp_commentmeta
     1690note     : Table does not support optimize, doing recreate + analyze instead
     1691status   : OK
     1692hadoopcon.wp_comments
     1693note     : Table does not support optimize, doing recreate + analyze instead
     1694status   : OK
     1695}}}
     1696   * '''mysqlanalyze'''
     1697     * `-a` : 作分析 analyse
     1698     * '-c` : 作檢查 check
     1699     * `-A` : 針對所有的資料庫、資料表
     1700     * `-u` : 指定 MySQL 使用者
     1701     * `-p` : 詢問密碼
     1702{{{
     1703~$ mysqlanalyze -A -a -u root -p
     1704Enter password:
     1705hadoopcon2015.wp_commentmeta                       OK
     1706hadoopcon2015.wp_comments                          OK
     1707}}}