How does PHPMyAdmin calculate space taken and wasted?

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
User avatar
puckeye
Forum Contributor
Posts: 105
Joined: Fri Dec 06, 2002 7:26 pm
Location: Joliette, QC, CA
Contact:

How does PHPMyAdmin calculate space taken and wasted?

Post by puckeye »

Hi all,

I'm trying to figure out how the makers of PHPMyAdmin came up with the equations of the space taken/wasted in their program?

Why I want those equations is so that I can create a PHP module to Optimize the table when the waste is more then XXXXX bytes or maybe even when the waste reaches XX% of total space.

I have MySQL 3.23.41, PHP 4.0.6 on one server
and
MySQL 3.23.36, PHP 4.1.2 on another.

Thansk all
User avatar
puckeye
Forum Contributor
Posts: 105
Joined: Fri Dec 06, 2002 7:26 pm
Location: Joliette, QC, CA
Contact:

Post by puckeye »

Doesn't anybody here knows how to ask MySQL for the databases and tables actual size and if there's any wasted space?

I don't need the exact code from PHPMyAdmin (I could have taken it directly from the coding on our server) but more a simple "how-to" exemple.

I guess I'll have to scrounge the code to find out what I need.

Thanks anyway.
Post Reply