The list below indicates some of the ways that the mysqld server uses memory. See section 13.2.3 Tuning Server Parameters . When a query is running, a copy of the current query string is also allocated.
All threads share the same base memory.
This is because the 32-bit memory space of 4GB is not large enough for most big tables. When systems with a 64-bit address space become more common we may add general support for memory mapping. All joins are done in one pass, and most joins can be done without even using a temporary table. See section 7.33 SET Syntax . However, this will affect the speed of many complicated queries.