Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email firstname.lastname@example.org
From: Michael Dykman (mdykmangmail.com)
Date: Mon Apr 27 2009 - 22:55:23 CDT
> I'm using Mysql on Linux.
> How can I see the space a certain database is taking on disk ?
There are a number of factors to consider here. If you are using a
recent version of MySQL such as might be shipped with a recent linux
distro, your default table types are likely using the innodb table
type. (The mysql data still uses MyISAM tables but the space is
In a typical setup, .all your InnoDb tables are stored in
pre-allocated extendt which can be found in your mysql data directory
in files names ibdataN, when N isan integer.. ie. ibdata1, ibdata2,
The initial size of the ibdata files depends on how your system is
configured. On my development workstation, mine sits at 50M. That
doesn't mean I"m storing 50M of actual data; it just means that I have
that much space allocated and that file is not going to grow until I
have filled it up. As I only handle small amounts of data on this
machine, it may never grow. HOwever, as you delete data, it is not
going to shrink either.
Probably, the metric you are looking for can be best appreciated by
logging into your database through the console and issuing this
SHOW TABLE STATUS;
I hope this helps.
- michael dykman
- All models are wrong. Some models are useful.
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql