Amazon RDS Storage Size Different

I am using the AWS RDS database.

The db state says the storage size is 64 GB. Refer to the application.

enter image description here

But the following query says only 156 MB of free space available in the database.

mysql> SELECT table_schema "Data Base Name",sum( data_length + index_length ) / 1024 / 1024 "Data Base Size in MB", sum( data_free )/ 1024 / 1024 "Free Space in MB" FROM information_schema.TABLES GROUP BY table_schema; +--------------------+----------------------+------------------+ | Data Base Name | Data Base Size in MB | Free Space in MB | +--------------------+----------------------+------------------+ | prod | 8451.21875000 | 156.00000000 | | test | 0.28125000 | 0.00000000 | | information_schema | 0.00781250 | 0.00000000 | | mysql | 5.43510628 | 0.00000000 | +--------------------+----------------------+------------------+ 4 rows in set (18.42 sec) 

Can someone explain why the storage space is different from this?

+6
source share
1 answer

RDS probably has the innondb_file_per_table set, because of which it shows you the available space for this tablespace. I think this can increase if you put more data in a table under this database, if space is available (in this case it looks as it should be).

With cloud-based database services, you should ideally look only at the used disk space, which is returned to you by the first column. As for how accessible, there should be mathematics for subtracting the used space from the prepared space (plus I will leave some space for magazines and other things, I don’t know how RDS does it, but you need to specify some overheads).

0
source

Source: https://habr.com/ru/post/984034/


All Articles