Skip to content

Commit 2a8fe72

Browse files
authored
Merge pull request #3959 from ClickHouse/DerekChia-patch-1
Update debugging-memory-issues.md
2 parents 0298077 + 2858abd commit 2a8fe72

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

docs/guides/developer/debugging-memory-issues.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,13 +68,15 @@ SELECT formatReadableSize(sum(memory_usage)) FROM system.processes;
6868
SELECT formatReadableSize(sum(bytes_allocated)) FROM system.dictionaries;
6969
```
7070

71-
## Output total memory used by primary keys {#output-total-memory-used-by-primary-keys}
71+
## Output total memory used by primary keys and index granularity {#output-total-memory-used-by-primary-keys}
7272

7373
```sql
7474
SELECT
75-
sumIf(data_uncompressed_bytes, part_type = 'InMemory') as memory_parts,
75+
sumIf(data_uncompressed_bytes, part_type = 'InMemory') AS memory_parts,
7676
formatReadableSize(sum(primary_key_bytes_in_memory)) AS primary_key_bytes_in_memory,
77-
formatReadableSize(sum(primary_key_bytes_in_memory_allocated)) AS primary_key_bytes_in_memory_allocated
77+
formatReadableSize(sum(primary_key_bytes_in_memory_allocated)) AS primary_key_bytes_in_memory_allocated,
78+
formatReadableSize(sum(index_granularity_bytes_in_memory)) AS index_granularity_bytes_in_memory,
79+
formatReadableSize(sum(index_granularity_bytes_in_memory_allocated)) AS index_granularity_bytes_in_memory_allocated
7880
FROM system.parts;
7981
```
8082

0 commit comments

Comments
 (0)