I want to find total used and remaining space for each database in Azure SQL MI.
For that, from an example, when I right click on a database and select properties I see following example output, where total size should be ~365 GB:
data_size log_size total_size
TEST_DB 355.69042968750 1.31347656250 357.00390625000
When I run the following script Get size of all tables in database sum of Tables are around ~500MB, where I have no idea where is the remaining of 364.5 GB go.
Also instead when I run following solution's script (https://dba.stackexchange.com/a/339009/289736) again I see data sizes as much less from the data size which is around ~765MB:
I get lost correct way to get size of a database, since different approaches show different sizes. If there is a huge gap between allocated size and used size, where does gap generated from?