Difference between revisions of "G2pmysql"

From Hall A Wiki
Jump to: navigation, search
(New page: This is just a page to help my collect useful mysql commands for now. It'll be more useful in the future. -Ryan)
 
Line 1: Line 1:
 
This is just a page to help my collect useful mysql commands for now. It'll be more useful in the future.
 
This is just a page to help my collect useful mysql commands for now. It'll be more useful in the future.
 
-Ryan
 
-Ryan
 +
 +
 +
Checking Database size:
 +
 +
    SELECT SUM(ROUND(((DATA_LENGTH + INDEX_LENGTH) / 1024 / 1024),2)) "Size in MB" FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA = "g2p";
 +
  +------------+
 +
    | Size in MB |
 +
  +------------+
 +
    |      3.34 |
 +
  +------------+
 +
  1 row in set (0.11 sec)

Revision as of 12:22, 29 May 2012

This is just a page to help my collect useful mysql commands for now. It'll be more useful in the future. -Ryan


Checking Database size:

   SELECT SUM(ROUND(((DATA_LENGTH + INDEX_LENGTH) / 1024 / 1024),2)) "Size in MB" FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA = "g2p";
  +------------+
    | Size in MB |
  +------------+
    |       3.34 | 
  +------------+
  1 row in set (0.11 sec)