You are designing storage for two relational tables that are part of a 10-TB database on Google Cloud. You want to support transactions that scale horizontally. You also want to optimize data for range queries on non-key columns. What should you do?
A.
Use Cloud SQL for storage. Add secondary indexes to support query patterns.
B.
Use Cloud SQL for storage. Use Cloud Dataflow to transform data to support query patterns.
C.
Use Cloud Spanner for storage. Add secondary indexes to support query patterns.
D.
Use Cloud Spanner for storage. Use Cloud Dataflow to transform data to support query patterns.
Cloud Spanner is a fully-managed, horizontally scalable relational database service that supports transactions and allows you to optimize data for range queries on non-key columns. By using Cloud Spanner for storage, you can ensure that your database can scale horizontally to meet the needs of your application.
To optimize data for range queries on non-key columns, you can add secondary indexes, this will allow you to perform range scans on non-key columns, which can improve the performance of queries that filter on non-key columns.
C. Use Cloud Spanner for storage. Add secondary indexes to support query patterns.
Cloud Spanner is a fully-managed, horizontally scalable relational database service that supports transactions and allows you to optimize data for range queries on non-key columns. By using Cloud Spanner for storage, you can ensure that your database can scale horizontally to meet the needs of your application.
To optimize data for range queries on non-key columns, you can add secondary indexes, this will allow you to perform range scans on non-key columns, which can improve the performance of queries that filter on non-key columns.
- Option A, Using Cloud SQL for storage and adding secondary indexes to support query patterns, may not be the best option as Cloud SQL is a relational database service that does not support horizontal scaling and may not be able to handle the large amount of data and the number of queries required by your application.
- Option B, Using Cloud SQL for storage and using Cloud Dataflow to transform data to support query patterns, may not be the best option as Cloud SQL is a relational database service that does not support horizontal scaling and may not be able to handle the large amount of data and the number of queries required by your application. Additionally, Cloud Dataflow is a data processing service and not a storage service, so it may not be the best fit for this use case.
- Option D, Using Cloud Spanner for storage and using Cloud Dataflow to transform data to support query patterns, is not necessary as Cloud Spanner provides the ability to optimize data for range queries on non-key columns by adding secondary indexes. Cloud Spanner also supports transactional consistency, which is a feature that allows you to perform multiple operations that must be performed together in a single transaction. Additionally, Cloud Dataflow is a data processing service and not a storage service, so it may not be the best fit for this use case.
C is the answer.
https://cloud.google.com/architecture/autoscaling-cloud-spanner
When you create a Cloud Spanner instance, you choose the number of compute capacity nodes or processing units to serve your data. However, if the workload of an instance changes, Cloud Spanner doesn't automatically adjust the size of the instance. This document introduces the Autoscaler tool for Cloud Spanner (Autoscaler), an open source tool that you can use as a companion tool to Cloud Spanner. This tool lets you automatically increase or reduce the number of nodes or processing units in one or more Spanner instances based on how their capacity is being used.
https://cloud.google.com/spanner/docs/secondary-indexes
You can also create secondary indexes for other columns. Adding a secondary index on a column makes it more efficient to look up data in that column.
A is not correct because Cloud SQL does not natively scale horizontally.
B is not correct because Cloud SQL does not natively scale horizontally.
C is correct because Cloud Spanner scales horizontally, and you can create secondary indexes for the range queries that are required.
D is not correct because Dataflow is a data pipelining tool to move and transform data, but the use case is centered around querying.
A voting comment increases the vote count for the chosen answer by one.
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one.
So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
[Removed]
Highly Voted 4 years, 1 month ago[Removed]
Highly Voted 4 years, 1 month agonhanhoangle
Most Recent 1 year agoPolyMoe
1 year, 3 months agosamdhimal
1 year, 3 months agosamdhimal
1 year, 3 months agosamdhimal
1 year, 3 months agoMathew106
9 months, 2 weeks agozellck
1 year, 4 months agosedado77
1 year, 7 months agotsoetan001
2 years, 6 months agosumanshu
2 years, 10 months agosumanshu
2 years, 9 months agotimolo
3 years, 1 month agoNileshk611
3 years, 4 months agoarghya13
3 years, 5 months ago