Manel
Manel

Reputation: 1654

Dropping a SQL database in Google Cloud

We are testing the Google Cloud SQL service and we have a problem when importing our database.

Imported file include this command:

DROP DATABASE $my_db

But Google Cloud SQL dashboard still shows a storage size as if nothing was deleted.

Is it the right method for deleting a database without removing the supporting VM?

I don't want to delete the whole VM as instance names seem to be reserved for two months.

Upvotes: 0

Views: 1999

Answers (1)

cflewis
cflewis

Reputation: 7401

InnoDB will hold onto the data that it has allocated itself, so when you create a database and delete it, the storage usage remains the same. This means you can't reduce the maximum storage you have used, but InnoDB will recycle the space it has reserved if you import new data.

Upvotes: 2

Related Questions