Re: Mysql DB / Table Disk Usage

From: Date: Sat, 23 Dec 2000 19:00:27 +0000
Subject: Re: Mysql DB / Table Disk Usage
References: 1 2 3 4 5 6 7  Groups: php.general 
Request: Send a blank email to php-general+get-31701@lists.php.net to get a copy of this message
Agreed - I'd be hardpressed to see it done. Of course, they might have a sucky admin that chmod 777 the data directory... --Joe On Sat, Dec 23, 2000 at 07:49:52PM +0100, Cynic wrote: > > >Other than that You would have to cycle through every table > >and add up all the bytes (which would suck). > > Besides, it would be way off the real numbers. > Reasons: > 1) When you delete data from atable, the RDBMS just _marks_ the > space the data occupied as unused, ready to get overwritten > with the next insert insert. But it still takes space. You > would have tu (I hope it's called that) 'pack' the table. > So, if you have 500MB table with 5% of deleted data, thats > 25MB of space you will slip. > 2) You haven't taken into account the index file counterpart > every data file has. > > sizeof( $data ) < sizeof( $files ) > > > At 19:25 23.12. 2000, Joe Stump wrote the following: > -------------------------------------------------------------- > >MySQL is VERY picky about who it lets into its data directory. I don't think > >there is a good way to do it. I would "man mysqladmin" and see if that might > >be able to do it. Other than that You would have to cycle through every table > >and add up all the bytes (which would suck). > > > >--Joe > > > >On Sat, Dec 23, 2000 at 06:15:48PM -0000, Cybercandy Ltd wrote: > >> I've search the archives and haven't found an answer to this question. > >> > >> Is there anyway in php and/or mySQL to report on the amount of disk space > >> that a > >> database and/or a table is occupying. > >> > >> Bearing in my that because I'm using an ISP rather than my own webserver I > >> don't think > >> I have access to the database file itself. > >> > >> > >> > >> Allan Goacher > >> www.cybercandy.co.uk > >> > >> > >> > >> -- > >> PHP General Mailing List (http://www.php.net/) > >> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > >> For additional commands, e-mail: php-general-help@lists.php.net > >> To contact the list administrators, e-mail: php-list-admin@lists.php.net > > > >--- > >Joe Stump > >PHP Programmer > >www.Care2.com > > > > > >-- > >PHP General Mailing List (http://www.php.net/) > >To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > >For additional commands, e-mail: php-general-help@lists.php.net > >To contact the list administrators, e-mail: php-list-admin@lists.php.net > ------end of quote------ > > > > ____________________________________________________________ > Cynic: > > A member of a group of ancient Greek philosophers who taught > that virtue constitutes happiness and that self control is > the essential part of virtue. > > cynic@mail.cz > > --- Joe Stump PHP Programmer www.Care2.com

« previous php.general (#31701) next »