Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: Size of mysql database/tables with perl

by rnahi (Curate)
on Feb 04, 2006 at 16:51 UTC ( #527961=note: print w/replies, xml ) Need Help??


in reply to Size of mysql database/tables with perl

I am often in need of this info, and I usually resort to the one-liner way. Here is my personal recipe:

$ mysql dbname -e 'show table status' | \ perl -lane '$size += $F[6]+$F[8];END{print $size}'

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://527961]
help
Chatterbox?
[Lady_Aleena]: atcroft, the whole link thing might be a question for either or both the CPAN sites. search.cpan is cpansearch@perl. org, and metacpan doesn't have an email addy for the website itself.
Lady_Aleena just followed @metacpan on Twitter.
[atcroft]: I may just post a question about it later. *shrug*
[Lady_Aleena]: I wish I could have helped you further but I've never uploaded to cpan or metacpan so I don't know much.

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (5)
As of 2017-05-27 04:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?