One of the projects we are involved with has a data store in RDS, recently I had to figure out the size of the tables and one of the databases. As RDS does not report this diectly, I had to dig through some internet to get my answers, and this post is the result, having all the queries in one place, so next time I need it, I can find it with ease.
OK, first thing I wanted to find out is exactly how much space is the db using, the following query answers that in a nice way.
|
|
So this tells me that database dbase
has the size of 1.4TB.
This is a good thing to know, but lets see how much space is each MySql engine
using. The following query answers that in a nice way.
|
|
So now I know that my people were smart and only used InnoDB, and that Index size of the database is ridiculous, more than twice the size of the data. I needed a moment to pick my jaw from the floor.
OK, lets dig in some more and see the actual tables data size and index size.
The following query answers that in a nice way, remember to change table_schema
to your db name at line 16.
|
|
And once again the results are in. It is obvious hat splatter_table
is out of control.
So there you go, a nice set of queries that will answer the questions about the database size.