Created
July 25, 2017 19:57
-
-
Save pollin14/7183066a9d9078664e70b75521d61e96 to your computer and use it in GitHub Desktop.
Query to return the size of the tables in mysql
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
Recommended InnoDB Buffer Pool Size (RIBPS) with additional 60% (1.6 rate). The result's units is giga bytes. | |
Source: https://dba.stackexchange.com/questions/27328/how-large-should-be-mysql-innodb-buffer-pool-size | |
*/ | |
SELECT CEILING(Total_InnoDB_Bytes*1.6/POWER(1024,3)) RIBPS FROM | |
(SELECT SUM(data_length+index_length) Total_InnoDB_Bytes | |
FROM information_schema.tables WHERE engine='InnoDB') A; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment