Guest User

Untitled

a guest
Jan 18th, 2018
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. SELECT
  2. tab.TABLE_SCHEMA as 'database',
  3. ROUND(sum(data_length) / 1024 / 1024, 2) as 'Tamanho em MB',
  4. ROUND(sum(index_length) / 1024 / 1024, 2) as 'Tamanho do indice em MB',
  5. ROUND(sum(DATA_LENGTH + INDEX_LENGTH) / 1024 / 1024, 2) as 'Tamanho toal em MB'
  6. FROM information_schema.TABLES as tab
  7. where TABLE_SCHEMA not in ('sys', 'information_schema')
  8. group by TABLE_SCHEMA
  9. order by sum(DATA_LENGTH + INDEX_LENGTH) desc;
Add Comment
Please, Sign In to add comment