Reputation: 295
cloud spanner in database detail has: Total storage.
Can i take this value by query?
Also how to find tables sizes (by query). At the end of which will be total storage size.
Thank you
Upvotes: 2
Views: 1828
Reputation: 2043
Just released table size statistics system table that includes table and index sizes. Sample query from docs:
SELECT interval_end
,table_name
,used_bytes
FROM spanner_sys.table_sizes_stats_1hour
WHERE interval_end =
(
SELECT MAX(interval_end)
FROM spanner_sys.table_sizes_stats_1hour
)
ORDER BY used_bytes DESC;
See full details at https://cloud.google.com/spanner/docs/introspection/table-sizes-statistics
Upvotes: 1
Reputation: 365
To get a general idea of the tables size porportions, we check the resulted avro
files sizes when exporting the DB (we have a daily job for backup).
Of-course it is not accurate since it's a whole different storage model.
Upvotes: 2