groupInfo expandAfterMode 0 groupName SQL snippetsTE2 abbreviation db:new abbreviationMode 1 creationDate 2013-06-23T05:50:09Z label Create new database modificationDate 2013-06-23T05:50:09Z plainText CREATE DATABASE %filltext:name=Database%; snippetType 0 uuidString 70449749-01C2-45BE-8B12-D77F1FB46C5C abbreviation db:del abbreviationMode 1 creationDate 2013-06-23T05:48:37Z label Delete database modificationDate 2013-06-23T05:50:43Z plainText DROP DATABASE %filltext:name=Database%; snippetType 0 uuidString 00B87955-E1B0-4C5F-A152-16D179248021 abbreviation db:size abbreviationMode 0 creationDate 2015-08-06T18:46:02Z label Get size of all database tables (largest first) modificationDate 2015-08-06T18:47:02Z plainText SELECT table_name AS "Tables", round(((data_length + index_length) / 1024 / 1024), 2) "Size in MB" FROM information_schema.TABLES WHERE table_schema = "%filltext:name=Database name%" ORDER BY (data_length + index_length) DESC; snippetType 0 uuidString 761650F8-1417-4219-9EDF-4FD233405EBF abbreviation db:report abbreviationMode 0 creationDate 2015-08-06T18:47:38Z label Get size and stats of all datatabases modificationDate 2015-08-06T18:48:42Z plainText SELECT CONCAT(table_schema, '.', table_name) AS "DB/Table name", CONCAT(ROUND(table_rows / 1000000, 2), 'M') rows, CONCAT(ROUND(data_length / ( 1024 * 1024 * 1024 ), 2), 'G') DATA, CONCAT(ROUND(index_length / ( 1024 * 1024 * 1024 ), 2), 'G') idx, CONCAT(ROUND(( data_length + index_length ) / ( 1024 * 1024 * 1024 ), 2), 'G') total_size, ROUND(index_length / data_length, 2) idxfrac FROM information_schema.TABLES ORDER BY data_length + index_length DESC; snippetType 0 uuidString ACB68A56-C325-478D-BA36-A50F59B8438F