Q: Spanner - How to find table size 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

A: Cloud Spanner table sizes aren't currently exposed.

A: 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.

A: 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
