SET @k_bytes = 1024; SET @m_bytes = @k_bytes * 1024; SET @g_bytes = @m_bytes * 1024;
SELECT ( @@key_buffer_size + @@query_cache_size + @@tmp_table_size+ @@innodb_buffer_pool_size + @@innodb_additional_mem_pool_size+ @@innodb_log_buffer_size+
@@max_connections * ( @@read_buffer_size + @@read_rnd_buffer_size + @@sort_buffer_size+ @@join_buffer_size + @@binlog_cache_size + @@thread_stack ) ) / @g_bytes
AS MAX_MEMORY_USED_GB;
特别注意
read_buffer_size read_rnd_buffer_size sort_buffer_size join_buffer_size binlog_cache_size
这几个参数是每个连接都会分配的
阅读(934) | 评论(0) | 转发(0) |