mirror of
https://github.com/OneUptime/oneuptime.git
synced 2026-04-06 00:32:12 +02:00
docs: Add SQL query to check used and free space in Clickhouse
This commit is contained in:
@@ -36,4 +36,18 @@ GROUP BY
|
||||
database,
|
||||
table
|
||||
ORDER BY size DESC;
|
||||
```
|
||||
|
||||
|
||||
#### Check the size fo used and free space in Clickhouse
|
||||
|
||||
```sql
|
||||
SELECT
|
||||
d.name AS disk_name,
|
||||
formatReadableSize(d.free_space) AS free_space,
|
||||
formatReadableSize(d.total_space) AS total_space,
|
||||
formatReadableSize(d.total_space - d.free_space) AS used_space,
|
||||
round((d.total_space - d.free_space) / d.total_space * 100, 2) AS used_percent
|
||||
FROM system.disks d
|
||||
ORDER BY used_percent DESC;
|
||||
```
|
||||
Reference in New Issue
Block a user