Search code examples
mysqlgoogle-cloud-sql

Google Cloud SQL import size bigger than original DB


I'm confronting a strange situation here with Google Cloud SQL.

I'm migrating a 15.7Gb mysql database to Google cloud. I've followed the migration process exactly as the doc says. And everything worked perfectly. Absolutely no issue during the process, my application works just fine. The only problem here is that the size used by the DB shown on Google Cloud is much bigger that the original DB. Right now I have a 39Gb sql database, from a 15.7Gb database.

After some research and testing I've come to the conclusion that it's the way that Google count the data on their side.

I just wanted to know if somebody have any idea, or can confirm what I'm saying.

Thank you for your answers.


Solution

  • Thanks to @Vadim.

    The huge database size was due to the binary logs option that was enabled by default on Google Cloud SQL.

    I've pruned them by disabling and re-enabling the binary logs option. The database got from 39Gb to 24Gb.