mysql wordpress チューニング

wordpress

便利だけどWordpressを重くするプラグインまとめ | WordPressのお医者さん

DBのサイズ

SELECT 
    table_schema, sum(data_length) /1024/1024 AS mb 
FROM 
    information_schema.tables  
GROUP BY 
    table_schema 
ORDER BY       
    sum(data_length+index_length) DESC;

Tableのサイズ

SELECT  
    table_name, engine, table_rows AS tbl_rows,
    avg_row_length AS rlen,  
    floor((data_length+index_length)/1024/1024) AS allmb,  # all
    floor((data_length)/1024/1024) AS dmb,  # data
    floor((index_length)/1024/1024) AS imb   # index
FROM 
    information_schema.tables  
WHERE
    table_schema=database()  
ORDER BY
    (data_length+index_length) DESC;  

MySQLでDBとテーブルのサイズを確認するSQL - Qiita

postmeta

https://www.webnots.com/large-post-meta-table-in-wordpress-here-is-how-to-cleanup/