Beefy Boxes and Bandwidth Generously Provided by pair Networks Cowboy Neal with Hat
Keep It Simple, Stupid
 
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 drinking their drinks and smoking their pipes about the Monastery: (7)
As of 2014-04-20 04:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (485 votes), past polls