get_memory_by_host
Analyze MySQL memory usage by host, user, or event type to identify resource consumption patterns and optimize database performance through detailed memory allocation insights.
Instructions
Get memory usage breakdown by host or user.
Uses sys schema or performance_schema to show:
Memory allocated per host
Memory allocated per user
Memory by event/operation type
Requires performance_schema memory instrumentation enabled.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| group_by | No | Group memory by | host |
| limit | No | Maximum results to return |
Input Schema (JSON Schema)
{
"properties": {
"group_by": {
"default": "host",
"description": "Group memory by",
"enum": [
"host",
"user",
"event_name"
],
"type": "string"
},
"limit": {
"default": 25,
"description": "Maximum results to return",
"type": "integer"
}
},
"required": [],
"type": "object"
}