Choosing Cloud SQL vs Spanner for Vertical Scaling

PDE By islever Editorial Last updated

Short answer

A Cloud SQL is the appropriate fully managed, SQL-compatible database that supports vertical scaling up to 30 TB, meeting the 6 TB requirement without the complexity of distributed systems.

Question

You need to choose a database for a new project that has the following requirements:
✑ Fully managed
✑ Able to automatically scale up
✑ Transactionally consistent
✑ Able to scale up to 6 TB
✑ Able to be queried using SQL
Which database do you choose?
  1. Cloud SQL Correct Answer
  2. Cloud Bigtable
  3. Cloud Spanner
  4. Cloud Datastore

Key Takeaways

The main trap is selecting Cloud Spanner due to its popularity for scalable SQL; however, Spanner is for horizontal scaling, while the question specifies 'scale up' (vertical) to a modest 6 TB limit.

This question tests the ability to select a Google Cloud database based on specific scaling requirements. Cloud SQL is the correct answer for vertically scaling to 6 TB with SQL support.

Common mistake: Candidates often choose Cloud Spanner (C) because it is known for high availability and strong consistency. They overlook that Spanner is designed for horizontal scaling and much larger datasets, making it less suitable for a simple 'scale up' scenario where Cloud SQL's vertical scaling capabilities are sufficient and more cost-effective.

Expert Analysis

The Trap: Confusing 'Scale Up' with Horizontal Scalability The question requires a database that is fully managed, transactionally consistent, SQL-queryable, and able to scale up to 6 TB. The most attractive but incorrect option is C (Cloud Spanner). Spanner is the industry standard for globally distributed, horizontally scalable SQL databases with strong consistency. However, it is designed for massive scale (often petabytes) and complex distributed architectures. Choosing Spanner for a simple 6 TB requirement is often an over-engineering trap in certification exams unless global distribution or extreme horizontal scaling is explicitly requested.

Why Cloud SQL is Correct A (Cloud SQL) is the correct choice because it perfectly matches the specific constraint of 'scaling up' (vertical scaling) to a moderate size like 6 TB. Cloud SQL allows you to increase instance size (CPU/RAM) and storage automatically or manually. Google Cloud SQL supports storage up to 30 TB for MySQL/PostgreSQL instances, easily covering the 6 TB requirement. It is fully managed, ACID-compliant, and uses standard SQL. The key distinction lies in the phrase 'scale up,' which typically refers to vertical scaling (adding resources to a single node), whereas Spanner is associated with horizontal scaling (adding nodes).

Why Other Options Fail

  • B (Cloud Bigtable): Is a NoSQL wide-column store, not SQL-queryable, and lacks full ACID transactional consistency across rows in the same way relational databases do.
  • D (Cloud Datastore): Is a NoSQL document store using GQL/NDB, not standard SQL, and does not support complex transactions in the same manner as relational databases.

Official Reference

These links open the official vendor documentation in a new tab.

Exam Strategy

When evaluating database options, pay close attention to the type of scaling mentioned. 'Scale up' usually implies vertical scaling (larger instances), pointing toward Cloud SQL or Cloud SQL for PostgreSQL/MySQL. 'Scale out' or 'horizontal scaling' points toward Cloud Spanner or Bigtable. Additionally, check the data size constraints; if the requirement is under 10-20 TB and doesn't require global distribution, the simpler relational option is often the intended answer.

Frequently Asked Questions

Does Cloud SQL support automatic storage scaling?

Yes, Cloud SQL can be configured to automatically increase storage capacity when it reaches a certain threshold, helping meet 'automatic scaling' requirements.

Can Cloud Spanner scale vertically?

Spanner primarily scales horizontally by adding nodes. While you can change node count, it is not designed for vertical scaling of a single instance in the same way Cloud SQL is.

Is Cloud Datastore SQL compatible?

No, Cloud Datastore is a NoSQL document database that uses GQL, not standard SQL, so it fails the SQL query requirement.

More PDE FAQ →

Community Votes

C
61%
A
39%

61% of anonymous learners picked answer C. Votes are pick records left by other test-takers — they are not the verified answer.

Discussion 81 contributions

Compiled from public community threads and reader submissions, lightly edited for clarity. Handles and vote tallies are shown as recorded, and comments reflect the views of individual contributors.

From public community threads 30 of 81

  1. Anonymous learner 👍 37
    Correct: A It asks for scaling up which can be done in cloud sql, horizontal scaling is not possible in cloud sql Automatic storage increase If you enable this setting, Cloud SQL checks your available storage every 30 seconds. If the available storage falls below a threshold size, Cloud SQL automatically adds additional storage capacity. If the available storage repeatedly falls below the threshold size, Cloud SQL continues to add storage until it reaches the maximum of 30 TB.
  2. google_learner123 👍 10
    C - CloudSQL does not scale automatically.
  3. gcp_k 👍 9
    Answer could be : A Both Cloud Spanner and Cloud SQL does not have auto scaling feature natively. You need to build automation around it based on metrics. Both Cloud SQL and Cloud Spanner supports SQL. With Cloud SQL, you can go up to 10 TB of storage which also satisfies the other requirement. Consistency - Of course, with Cloud SQL, you have single master and read replicas. So technically the data will be consistent across all instances so to speak. The reason why I didn't choose Spanner is - There is no requirement for HA DR, multi region, secondary indexes, etc.. So I choose "A"
  4. droogie 👍 8
    The number is 6TB, so the answer should be A (according to your logic)
  5. StelSen 👍 7
    Answer: C Look at key requirement: Automatic Scale Up (An ability to increase compute/memory capacity, Not storage. For storage, there is another requirement which is increase upto 6TB). So, Option-C is more appropriate, although the Cost is high. This is just an exam. In real world, I will convince customer to use Cloud SQL and will be able to use some Cloud Function to achieve near real time scaling even if I use Cloud SQL)
Show 25 more comments
  1. sh2020 👍 6
    Both A and C meet most the requirements. The difference is in automatically scaling. Spanner does horizontally scale. Cloud SQL has API you can use and scale. It is not automated. It does increase storage automatically but not CPU, RAM etc. So I vote for Spanner
  2. atnafu2020 👍 5
    A Cloud Spanner-Scales out/horizontally by increasing its storage capacity. Cloud SQL scales up/vertically by increasing its storage capacity. Cloud SQL instances support MySQL 8.0, 5.7 (default), and 5.6, and provide up to 416 GB of RAM and 30 TB of data storage, with the option to automatically increase the storage size, as needed.
  3. medeis_jar 👍 5 Answered C
    ✑ Able to automatically scale-up ✑ Transactionally consistent Only Spanner, Cloud SQL scale only storage automatically.
  4. zxing233 👍 5
    Cloud SQL can automatically scale up storage capacity when you are near your limit
  5. Callumr 👍 5
    its A Cloud SQL meets all these requirements
  6. baubaumiaomiao 👍 5
    you are wrong :)
  7. Rav761 👍 4 Answered C
    C. Cloud Spanner Here's why: Fully Managed: Cloud Spanner is a fully managed database service provided by Google Cloud. Automatic Scaling: It automatically scales horizontally to handle increased workloads and data volumes. Transactional Consistency: Cloud Spanner provides strong transactional consistency with support for ACID transactions. Scalability: It can easily scale up to and beyond 6 TB while maintaining performance and consistency. SQL Queries: Cloud Spanner supports SQL queries, making it compatible with existing SQL-based analytics and applications.
  8. NicolasN 👍 4 Answered A
    The whole discussion is around the bullet "Able to automatically scale up" If this was referring explicitly to memory or CPU scaling. answer [A] would be incorrect. But the subsequent bullet "Able to scale up to 6 TB" makes it clear (at least for me) that the former is referring to storage scaling.
  9. SPutri 👍 4
    the keyword is in "transactional consistency" which lead me to choose Cloud Spanner :) https://cloud.google.com/spanner
  10. dmzr 👍 4
    it does not say about type of scaling, Cloud SQL scale up automatically with storage, that should works
  11. DeepakS227 👍 4
    Able to automatically scale up so A can be eliminated. right answer is C
  12. digvijay 👍 4
    Should be C. As Cloud SQL is not suitable for scaling for huge data.
  13. dg63 👍 3
    "A" Cloud SQL meets the requirements. https://cloud.google.com/sql Easily scale up as your data grows—add up to 64 processor cores and more than 400 GB of RAM and 30 TB of storage and add read replicas to handle increasing read traffic. Cloud SQL can automatically scale up storage capacity when you are near your limit. This way you don’t have to spend time estimating future storage needs or spend money on capacity until you need it.
  14. musumusu 👍 3
    Answer A: CloudSQL Don't confuse anymore, SQL needs, Cloud sql or Spanner. nothing mentioned that data should be highly available or scalable or increasing in future So, don't go with Spanner. Ideal use case, Cloud Sql can handle UP TO 30TB. Other two options are no-sql so don't go.
  15. someshsehgal 👍 3
    Correct C. Cloud SQL has limitation, it cant scale automatically. Scale your instances effortlessly with a single API call whether you start with simple testing or you need a highly available database in production. https://cloud.google.com/sql
  16. ArunSingh1028 👍 3
    Ans - C seems more accurate as per google docs where they have clearly mentioned about "Transactional consistency" for spanner but i couldn't find this proof for Cloud SQL.. but i agree that Cloud SQL is also transactional consistent.
  17. juliobs 👍 3 Answered A
    People here are rejecting Cloud SQL because it does not scale up CPU and MEM automatically, but Cloud Spanner also don't (not without hosting the Autoscaler tool yourself).
  18. dambilwa 👍 3
    Option [A] - Cloud SQL looks to be the correct answer. Cloud SQL meets all the criterion- https://cloud.google.com/sql/docs/mysql/instance-settings
  19. triipinbee 👍 3
    A: Cloud SQL can manage upto 10TB of data, the storage is automatically increase if you have selected the option and is fully managed.
  20. arturido 👍 3 Answered A
    "Able to scale up to 6 TB" -seems to be the key it looks like autoscaling is related to storage - possible in case of Cloud SQL
  21. gvaf4 👍 3
    I don't know if Cloud SQL provide transactionally consistency. I would say C is more appropriate.
  22. Rajokkiyam 👍 3
    Should be A. Cloud SQL supports scale up up to 30TB. And its fully managed too.
  23. hauhau 👍 3 Answered C
    C because only cloud spanner fit requirement: Able to automatically scale up
  24. cuadradobertolinisebastiancami 👍 3 Answered A
    Not horizontal scaling is required, cloud SQL will work for 10 TB
  25. rbeeraka 👍 3 Answered A
    Cloud SQL can scale up and fully managed DB service.

Reader comments & corrections

No reader corrections yet — spotted an error or have a note? Share it below.

Log in to comment, report an error, or add a note about this question.

← Back to PDE Study Guide