Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
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?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (6)
As of 2017-10-21 13:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My fridge is mostly full of:

















    Results (270 votes). Check out past polls.

    Notices?