QBoard » Big Data » Big Data on Cloud » Google Cloud SQL import size bigger than original DB

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.

      January 13, 2022 1:50 PM IST
    0
  • -Did you enable Point-in-time recovery? PITR uses write-ahead logs and if you enabled this feature, that could be the reason why of your increases.

    -Have you used temporary tables and you have not deleted them?

    If none of the above applies to you, I highly recommend you to open a case with GCP support team so that they take a look at your Cloud SQL instance.

    On the other hand, you should open a case to decrease the disk size to a smaller one so it won’t be necessary to create a new instance and copy all the data to that new instance in addition that shrinking the disk is done at Google's end making the effort from you the lowest possible.

    A maintenance window can be scheduled where Google can proceed with this task and you may want to schedule a maintenance window to minimize the impact of the downtime. For this case it is necessary to know the new disk size and when you would like to perform this operation.

    Finally, if you prefer to use the migration method, you should export the DB, then create the new instance, import the DB and synchronize the old one with the new one to have all the data in both instances to which can take several hours to complete those four steps.

      February 11, 2022 12:38 PM IST
    0
  • 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.

      February 2, 2022 1:41 PM IST
    0