Data size


I was wondering how to determine the total size of the data contained in tables (tables + indices).
I am using only InnoDB tables and my /etc/my.cnf contains the following relevant items:

innodb_data_file_path = ibdata1:1700M;ibdata2:10M:autoextend

Now in my mysql data directory
1.7G Aug 22 20:05 mysql-home/data/ibdata1

Obviously this file was created upon starting mysql for the first time, irrespective of the data (which I’m sure is smaller than 1.7G)

I want to know what part of ibdata1 is “in use”.
Kind of basic question I know, and I can guess that somewhere the answer is in SHOW INNODB STATUS, but I couldn’t find it in the documentation or deduce it myself.


P.S. just curious, what HTML editor are you using in this site?
Pretty cool.

Run SHOW TABLE STATUS, in the Comment field there will be the message saying how much space is free in Innodb tablespace, so you can compute how much is busy.

From the same statement output you can see sizes for data and index for individual tables adding these up is yet another way.

This site use FUDForum, I’m not sure what you mean by HTML editor.

Yes, SHOW TABLE STATUS is just what I need.


BTW The HTML Editor is the gui “control” that you type the posts in (with the Bold, Italic, et al buttons). There are a variety out there, I just hadn’t seen one exactly like this.