Last active
August 29, 2015 14:03
-
-
Save solrevdev/8ec6a159729b91c75f6d to your computer and use it in GitHub Desktop.
how much to set InnoDB_Buffer_Pool_Size on mysql box
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
SELECT CONCAT(CEILING(RIBPS/POWER(1024,pw)),SUBSTR(' KMGT',pw+1,1)) | |
Recommended_InnoDB_Buffer_Pool_Size FROM | |
( | |
SELECT RIBPS,FLOOR(LOG(RIBPS)/LOG(1024)) pw | |
FROM | |
( | |
SELECT SUM(data_length+index_length)*1.1*growth RIBPS | |
FROM information_schema.tables AAA, | |
(SELECT 1.25 growth) BBB | |
WHERE ENGINE='InnoDB' | |
) AA | |
) A; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment