web analytics
Skip to primary content
Skip to secondary content

MemoSoup

Mix of the things I always forget

MemoSoup

Main menu

  • Home
  • About
  • Links

Tag Archives: size

mySQL: size of the database

Posted on 16/10/2009 by bigspoon
Reply


select table_schema "Database",
sum( data_length + index_length ) / 1024 / 1024 "Size (MB)",
sum( data_free )/ 1024 / 1024 "Free (MB)"
from information_schema.tables
group by table_schema ;

This will work in mySQL 5.0.2 and newer. Use SHOW TABLE STATUS command for other versions.

Posted in mysql | Tagged database, mysql, size | Leave a reply

Meta

  • Log in
  • Entries feed
  • Comments feed
  • WordPress.org
Proudly powered by WordPress