Thursday, September 24, 2009

MYSQL Database Size

Hi,
Here is the steps to get the Database size details in mysql.
1) excute the following command
show table status like '%';

2) To get the total allocated space to a database
SUM(data_length) + SUM(index_length)

3) Total of actual data:
(SUM(data_length) - SUM(data_free)) + SUM(index_length)

4) Allocated but unused:
SUM(data_free)

Regards
DeepthiMahesh

No comments: