You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When encountering memory issues or a memory leak, knowing what queries and resources are consuming a significant amount of memory is helpful. Below are queries that can help debug and find which queries, databases, and tables can be optimized:
11
+
When encountering memory issues or a memory leak, knowing what queries and resources are consuming a significant amount of memory is helpful. Below you can find queries that can help you to debug memory issues by finding which queries, databases, and tables can be optimized:
11
12
12
-
**List currently running processes by peak memory usage**
13
+
## List currently running processes by peak memory usage {#list-currently-running-processes-by-peak-memory}
13
14
14
15
```sql
15
16
SELECT
@@ -23,7 +24,7 @@ ORDER BY peak_memory_usage DESC
23
24
LIMIT100;
24
25
```
25
26
26
-
**List metrics for memory usage**
27
+
## List metrics for memory usage {#list-metrics-for-memory-usage}
27
28
28
29
```sql
29
30
SELECT
@@ -37,7 +38,7 @@ order by
37
38
value desc;
38
39
```
39
40
40
-
**List tables by current memory usage**
41
+
## List tables by current memory usage {#list-tables-by-current-memory-usage}
41
42
42
43
```sql
43
44
SELECT
@@ -48,25 +49,25 @@ FROM system.tables
48
49
WHERE engine IN ('Memory','Set','Join');
49
50
```
50
51
51
-
**Output total memory used by merges**
52
+
## Output total memory used by merges {#output-total-memory-used-by-merges}
0 commit comments