Phase 4: Optimize


Database Migration Strategies for GCP
Phase 1: Assess
1m 30s

The course is part of this learning path

Start course

In this course, we cover Google’s recommended best practices for migrating any database to the Google Cloud Platform. The four main phases covered are Assess, Plan, Deploy, and Optimize.  

Learning Objectives

  • Choose the best migration tools
  • Select a migration strategy
  • Define a fallback plan
  • Migrate and validate your data
  • Measure and optimize your results

Intended Audience

  • Database administrators
  • Database engineers
  • Anyone preparing for a Google Cloud certification


  • Some experience working with databases

At this point, you have finished your migration, but there is still one phase left.  And that is optimization.  So once everything is working correctly, you can start looking into making refinements.

First, you need to make sure that you have a clear picture of the health of your system.  You need to know:  How often are you getting error messages?  What kind of error messages are you getting?  What is the speed of your queries?  

The important thing is to have a quick and easy way to diagnose any future issues.  If you don’t have that, then you need to start building it.

Remember, it is not enough to just have logs.  You also need an effective way to search through those logs.  So take advantage of Cloud Logging and Logs Explorer whenever possible.  Also, you don’t want to just be reactive.  You want to be proactive as well.  Use Cloud Monitoring to send alerts for things like spikes in demand or when your queries slow down.

Once you can properly measure and monitor everything, then you can start looking for ways to make improvements.  You might end up rewriting some of your queries to be faster, or generate missing indexes.  Maybe you need to convert some of your read-write transactions to read-only in order to minimize record locking.  The important thing is to Identify areas for improvement and then evaluate which ones make the most sense to do.  

Now, If you have a large monolithic database that is serving multiple microservices, you might consider breaking it up.  This can make your maintenance and future deployments much easier.  And it will also allow you to store your data in the most appropriate format.

After that, you should carefully review all the options for availability and scalability.  Google Cloud makes it easy to survive spikes in demand load or local outages.  You may want to take the opportunity to test out your new system and find out how resilient it actually is.

And finally, you should also be looking for ways to lower your costs.  You might discover that small changes can have a big impact on your monthly bill. 

To help you with all of these, I highly recommend you consider switching to Google managed services.  Not only can they help lower administrative costs, but they can save you a ton on licensing as well.  Plus you generally get better high-availability and scalability options to help you handle future growth.

So, for example, if you are storing blobs of binary data, compare your current solution to Cloud Storage.  If you are using your database as a backend for web or mobile applications, you look into switching to Firestore.  If you are doing a lot of online analytical processing (OLAP), maybe BigQuery could be part of your future upgrade path.

Managed instances not only lessen the burden of maintenance, but they are also highly integrated with the rest of Google’s services.  And this makes it even easier to use your data for more advanced things like Big Data analytics and Machine Learning.

About the Author
Learning Paths

Daniel began his career as a Software Engineer, focusing mostly on web and mobile development. After twenty years of dealing with insufficient training and fragmented documentation, he decided to use his extensive experience to help the next generation of engineers.

Daniel has spent his most recent years designing and running technical classes for both Amazon and Microsoft. Today at Cloud Academy, he is working on building out an extensive Google Cloud training library.

When he isn’t working or tinkering in his home lab, Daniel enjoys BBQing, target shooting, and watching classic movies.