show table status;
A quick script to show you how much disk space all your tables in a database are using: <? mysql_connect("db.modwest.com", "username", "password"); mysql_select_db("yourdb"); $result = mysql_query("show table status"); $size = 0; $out = ""; while($row = mysql_fetch_array($result)) { $size += $row["Data_length"]; $out .= $row["Name"] .": ". round(($row["Data_length"]/1024)/1024, 2) ."<br>\n"; } $size = round(($size/1024)/1024, 1); echo $out ."<br>\n"; echo "Total MySQL db size: $size"; ?>
댓글 없음:
댓글 쓰기