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}'


Comment on Re: Size of mysql database/tables with perl
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://527961]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (6)
As of 2015-07-30 06:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (270 votes), past polls