Better mysql ‘show table status’

show table status

login to your server via ssh and run


root@host [~]# mysqlshow --status g33kinfo_wrdp1 |sort -n -k10 |awk -F\| '($6 !~ /0/)' |awk -F\| '{print $2 " " $6 " " $7 " " $14}' |egrep -v "^ "

this will give a result which looks like this

Name Rows Avg_row_length Update_time
wp_links 1 128 2009-06-14 04:30:57
wp_commentmeta 12 54 2010-01-03 18:29:22
wp_terms 12 30 2009-10-26 00:37:54
wp_term_taxonomy 13 47 2010-01-03 18:51:25
wp_users 14 119 2009-12-27 17:12:45
wp_usermeta 84 136 2010-01-03 18:52:58
wp_options 251 1536 2010-01-03 19:35:50
wp_postmeta 888 59 2010-01-03 18:51:26
wp_posts 1496 3603 2010-01-03 18:51:25

g33kadmin

I am a g33k, Linux blogger, developer, student and Tech Writer for Liquidweb.com/kb. My passion for all things tech drives my hunt for all the coolz. I often need a vacation after I get back from vacation....

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.