G2pmysql

From Hall A Wiki
Revision as of 12:22, 29 May 2012 by Rbziel (Talk | contribs)

Jump to: navigation, search

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)