mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Reducing memory when using information schema
The background is that one user had a lot of views and using some complex queries on information schema temporary memory of more than 2G was used. - Added new element 'total_alloc' to MEM_ROOT for easier debugging. - Added MAX_MEMORY_USED to information_schema.processlist. - Added new status variable "Memory_used_initial" that shows how much MariaDB uses at startup. This gives the base value for "Memory_used". - Reuse memory continuously for information schema queries instead of only freeing memory at query end. Other things - Removed some not needed set_notnull() calls for not null columns.
This commit is contained in:
@ -1173,6 +1173,7 @@ t1 CREATE TABLE `t1` (
|
||||
`MAX_STAGE` tinyint(2) NOT NULL DEFAULT 0,
|
||||
`PROGRESS` decimal(7,3) NOT NULL DEFAULT 0.000,
|
||||
`MEMORY_USED` bigint(7) NOT NULL DEFAULT 0,
|
||||
`MAX_MEMORY_USED` bigint(7) NOT NULL DEFAULT 0,
|
||||
`EXAMINED_ROWS` int(7) NOT NULL DEFAULT 0,
|
||||
`QUERY_ID` bigint(4) NOT NULL DEFAULT 0,
|
||||
`INFO_BINARY` blob DEFAULT NULL,
|
||||
@ -1196,6 +1197,7 @@ t1 CREATE TEMPORARY TABLE `t1` (
|
||||
`MAX_STAGE` tinyint(2) NOT NULL DEFAULT 0,
|
||||
`PROGRESS` decimal(7,3) NOT NULL DEFAULT 0.000,
|
||||
`MEMORY_USED` bigint(7) NOT NULL DEFAULT 0,
|
||||
`MAX_MEMORY_USED` bigint(7) NOT NULL DEFAULT 0,
|
||||
`EXAMINED_ROWS` int(7) NOT NULL DEFAULT 0,
|
||||
`QUERY_ID` bigint(4) NOT NULL DEFAULT 0,
|
||||
`INFO_BINARY` blob DEFAULT NULL,
|
||||
|
Reference in New Issue
Block a user