Files
Iain Sproat 55d51bd84f feat(db monitor): adds a new metric speckle_db_tablesize with db table sizes (#2474)
* feat(db queries): adds db query scripts for determining db sizes

* Adds a new metric `speckle_db_tablesize` with db table sizes

* lower case all the file types to provide a combined metric

* group file status count by lower cased file type

* reinstate accidentally deleted metric

* Fix developer script
2024-07-05 15:12:27 +01:00

4 lines
157 B
SQL

SELECT id, "streamId", "speckleType", "createdAt"::date, pg_column_size(data) / 1024 /1024 || 'MB' AS size, data
FROM objects
ORDER BY size DESC LIMIT 20;