Skip to content

Instantly share code, notes, and snippets.

@ts-3156
Last active September 13, 2016 01:40
Show Gist options
  • Save ts-3156/ac4e3c6e8c6f0c497a31 to your computer and use it in GitHub Desktop.
Save ts-3156/ac4e3c6e8c6f0c497a31 to your computer and use it in GitHub Desktop.
$if mysql
"\C-xd": "SHOW DATABASES;"
"\C-xt": "SHOW TABLES;"
"\C-gv": "SHOW GLOBAL VARIABLES LIKE '%%';"
"\C-gs": "SHOW GLOBAL STATUS LIKE '%%';"
"\C-xp": "SHOW PROCESSLIST;"
"\C-xs": "SELECT table_name, engine, table_rows as tbl_rows, avg_row_length as rlen, floor((data_length+index_length)/1024/1024) as allMB, floor((data_length)/1024/1024) as dMB, floor((index_length)/1024/1024) as iMB FROM information_schema.tables WHERE table_schema=database() ORDER BY (data_length+index_length) DESC;"
$endif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment