Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
SELECT
data.GLOBAL_BUFFER_SIZE,
data.THREAD_BUFFER_SIZE,
data.MAX_CONNECTIONS,
GLOBAL_BUFFER_SIZE + THREAD_BUFFER_SIZE * data.MAX_CONNECTIONS AS TOTAL_MEMORY_SIZE,
(GLOBAL_BUFFER_SIZE + THREAD_BUFFER_SIZE * data.MAX_CONNECTIONS)/1024 AS TOTAL_MEMORY_SIZE_KB,
(GLOBAL_BUFFER_SIZE + THREAD_BUFFER_SIZE * data.MAX_CONNECTIONS)/1024/1024 AS TOTAL_MEMORY_SIZE_MB,
(GLOBAL_BUFFER_SIZE + THREAD_BUFFER_SIZE * data.MAX_CONNECTIONS)/1024/1024/1024 AS TOTAL_MEMORY_SIZE_GB
FROM (
(
SELECT
@@GLOBAL.KEY_BUFFER_SIZE + @@GLOBAL.INNODB_BUFFER_POOL_SIZE + @@GLOBAL.INNODB_LOG_BUFFER_SIZE + @@GLOBAL.NET_BUFFER_LENGTH AS GLOBAL_BUFFER_SIZE,
@@GLOBAL.SORT_BUFFER_SIZE + @@GLOBAL.MYISAM_SORT_BUFFER_SIZE + @@GLOBAL.READ_BUFFER_SIZE + @@GLOBAL.JOIN_BUFFER_SIZE + @@GLOBAL.READ_RND_BUFFER_SIZE AS THREAD_BUFFER_SIZE,
@@GLOBAL.MAX_CONNECTIONS AS MAX_CONNECTIONS
) AS data
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment