Skip to content

Instantly share code, notes, and snippets.

@y2k-shubham
Created April 26, 2018 12:28
Show Gist options
  • Save y2k-shubham/1c4eb5fcd20c50a5cae785a19e7d0594 to your computer and use it in GitHub Desktop.
Save y2k-shubham/1c4eb5fcd20c50a5cae785a19e7d0594 to your computer and use it in GitHub Desktop.
Amount of data in table [excluding index]
SELECT
(data_length) / POWER(1024, 3) AS tablesize_gb
FROM
information_schema.tables
WHERE
table_schema = 'db_name' AND
table_name = 'table_name'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment