Skip to content

Instantly share code, notes, and snippets.

View rantler's full-sized avatar

Randy Antler rantler

  • Computer Diversions
  • Seattle, WA
  • 10:17 (UTC -07:00)
View GitHub Profile
Determine MySQL 5.1 maximum memory usage:
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 ) ) / 1073741824 AS MAX_MEMORY_GB
From: http://dev.mysql.com/doc/refman/5.0/en/memory-use.html