Bigtable Time-Series Schema Design for Cost and Scalability
Short answer
C Create a narrow table in Bigtable with a row key that combines the Computer Engine computer identifier with the sample time at each second.
Question
samples. Analysts will be performing real-time, ad hoc analytics against the database. You want to avoid being charged for every query executed and ensure that
the schema design will allow for future growth of the dataset. Which database and data model should you choose?
Key Takeaways
The trap is confusing 'wide tables' (often used in relational DBs or specific Bigtable optimizations like time-bucketing) with general flexibility. For IoT/time-series with evolving metrics, Bigtable's tall/narrow design is superior for schema evolution.
This question tests the selection of Cloud Bigtable over BigQuery for time-series data to avoid per-query costs. The correct approach is using a tall, narrow schema design to ensure flexibility for future metric additions.
Common mistake: Choosing Option D (Wide Table/Time-Buckets) because it seems more efficient for storage. However, wide tables make it difficult to add new metrics (KPIs) later without significant schema changes, violating the 'future growth' requirement.
Expert Analysis
The scenario requires storing high-volume time-series data (CPU/memory at one-second intervals) for millions of machines with real-time ad-hoc analytics and a cost model that avoids per-query charges.
Cost Model Analysis: BigQuery is a serverless data warehouse billed primarily on bytes processed per query (though caching exists, it doesn't guarantee zero charge for varied ad-hoc queries). Cloud Bigtable is billed based on provisioned nodes and storage capacity, not per query. This eliminates Options A and B immediately.
Schema Design Analysis: The core decision is between Option C (tall/narrow) and Option D (wide/time-bucketing).
- Option D suggests combining values for each second into column data within a row keyed by minute. While Bigtable supports 'time-bucketing' (grouping multiple timestamps into columns to improve compression), the prompt explicitly states samples are at one-second intervals. Creating a wide table where every second is a column would result in extremely sparse rows (only one active column per minute if aggregating, or massive width if not). More critically, comments highlight that adding new KPIs (future growth) to a wide schema is difficult because you'd need to add 60+ columns per metric.
- Option C proposes a tall and narrow table. In Bigtable best practices for time series, a tall/narrow design uses a composite row key (e.g.,
computer_id + timestamp) and stores each sample as a separate row or column family entry. This allows infinite scalability of metrics (adding CPU, Memory, Disk just adds new column families without altering the row structure) and handles high write throughput efficiently. It aligns with the requirement for future schema growth.
Therefore, C is the correct answer. It satisfies the NoSQL nature of Bigtable, the cost model (no per-query fees), and the flexibility required for future metric additions.
Official Reference
https://cloud.google.com/bigtable/docs/schema-design-time-series
This link opens the official vendor documentation in a new tab.
Exam Strategy
When evaluating database choices, always check the pricing model first. If the requirement is to avoid per-query costs for high-frequency reads/writes, eliminate serverless SQL warehouses (like BigQuery) in favor of NoSQL stores (like Bigtable). Next, evaluate schema flexibility: 'future growth' in metrics usually points toward a flexible, tall/narrow NoSQL design rather than a rigid, wide relational-style schema.
Frequently Asked Questions
Why is BigQuery not suitable for this use case?
What is the difference between tall/narrow and wide tables in Bigtable?
Community Votes
75% of anonymous learners picked answer C. Votes are pick records left by other test-takers — they are not the verified answer.
Discussion 31 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 31
-
psu 👍 35Answer C A tall and narrow table has a small number of events per row, which could be just one event, whereas a short and wide table has a large number of events per row. As explained in a moment, tall and narrow tables are best suited for time-series data. For time series, you should generally use tall and narrow tables. This is for two reasons: Storing one event per row makes it easier to run queries against your data. Storing many events per row makes it more likely that the total row size will exceed the recommended maximum (see Rows can be big but are not infinite). https://cloud.google.com/bigtable/docs/schema-design-time-series#patterns_for_row_key_design
-
madhu1171 👍 19C correct answer
-
Sumanth09 👍 8Should be A question did not talk about latency without query cost -- BigQuery Cache flexible schema - BigQuery (nested and repeated)
-
rickywck 👍 6should be C: https://cloud.google.com/bigtable/docs/schema-design-time-series
-
safiyu 👍 5C is the correct answer. If you consider wide table, then 60 columns for cpu usage and 60 columns for memory usage. in future, if you need to add a new kpi to the table, then the schema changes. you will have to add 60 more columns for the new feature. this is not so future proof.. so D is out of the picture.
Show 25 more comments
-
WillemHendr 👍 4 Answered D"..and ensure that the schema design will allow for future growth of the dataset": https://cloud.google.com/bigtable/docs/schema-design-time-series#time-buckets "Data stored in this way is compressed more efficiently than data in tall, narrow tables." I read the "future growth" as a sign to be effective in storage, and go for the Time-Buckets.
-
arnabbis4u 👍 4C look Fine.. Only doubt I have is it says they don't want to pay for every query execution. That requires the Bigquery caching feature. Confused. Anyone wants to comment on this?
-
FARR 👍 4bigquery pricing is query based and query-caching is helpful when queries exactly the same whereas bigtable prcing is mostly infra-based hence, answer should be C
-
dg63 👍 4I believe A. Use case requires support for Adhoc queries, and avoiding duplicate query costs.
-
arnabbis4u 👍 4I think A.
-
squishy_fishy 👍 3Answer is C. Bigtable is best suited to the following scenarios: time-series data (e.g. CPU and memory usage over time for multiple servers), financial data (e.g. transaction histories, stock prices, and currency exchange rates), and IoT (Internet of Things) use cases. https://www.xplenty.com/blog/bigtable-vs-bigquery/
-
_8008_ 👍 3What about "avoid being charged for every query executed"? Nothing on this topic in here https://cloud.google.com/bigtable/docs/schema-design-time-series can anyone comment?
-
Callumr 👍 3A - BigQuery caching will reduce query costs, and low latency of big table is not needed
-
Prakzz 👍 3both C and D row key will cause hotspotting
-
VM_GCP 👍 2BigQuery cannot be the answer as [1] This will not save the price by caching as query will not always be same https://cloud.google.com/bigquery/docs/cached-results#limitations [2] And the BigTable is always the correct solution for this use case as given in https://cloud.google.com/bigtable/docs/overview#what-its-good-for BigTable has native time series support and is preferred for large analytical and operational work Answer can be C or D. But problem is both the options will cause hot spotting. So not sure which to select
-
lollo1234 👍 2How do you store both CPU and memory usage though? Two sets of 60 columns per row? I am wondering if that goes along with "the schema design will allow for future growth"...what if by future growth they mean monitoring N more metrics. That would imply N*60 columns, right?
-
medeis_jar 👍 2 Answered CNarrow and tall table for a single event and good for time-series data Short and Wide table for data over a month, multiple events
-
DeepakS227 👍 2BQ is optimized for large-scale, ad-hoc SQL-based analysis. i Think it should be A
-
Remi2021 👍 2 Answered Ctime series = narrow table
-
VM_GCP 👍 2I will go for C
-
JG123 👍 2Correct: C
-
carbonscave 👍 1 Answered DWhy D is correct Bigtable Pricing Model: Cloud Bigtable is Google's fully managed NoSQL wide-column store, purpose-built for massive-scale, high-throughput time-series data. Most importantly for this prompt, Bigtable bills you a flat hourly rate for provisioned nodes and storage capacity. You are not charged per query. This perfectly satisfies the requirement to "avoid being charged for every query executed". Time Bucketing (The Wide Schema Pattern): When capturing data every second for millions of devices, creating a new row for every single second generates massive metadata overhead and balloons the size of the database. Google's architectural best practice for Bigtable time-series schemas is "time bucketing." By creating a row key at the minute level (e.g., device123#20231030-10:15) and storing the 60-second intervals as individual columns within that single row, you drastically reduce the number of rows, improve data compression, and optimize the database for massive future growth.
-
barnac1es 👍 1 Answered CScalability: Bigtable can handle large-scale data efficiently, making it suitable for storing time series data for millions of computers. Low Latency: Bigtable provides low-latency access to data, which is crucial for real-time analytics. Flexible Schema: The narrow table design allows you to efficiently store and query time series data without specifying all possible columns in advance, providing flexibility for future growth. Column Families: Bigtable supports column families, allowing you to organize data logically. Row Key Design: Combining the computer identifier with the sample time at each second in the row key allows for efficient retrieval of data for specific computers and time intervals. Analytics: While Bigtable does not support SQL directly, it allows for efficient data retrieval and can be integrated with other tools for analytics.
-
koupayio 👍 1First C & D won't cause hotspoting as computer_identifier is first part of row key I prefer D because "ensure that the schema design will allow for future growth of the dataset." C is too tall and narrow I cannot see schema design grow in the future
-
Aman47 👍 1No, it won't, because preceding timestamp with identifier values helps in a tradeoff between randomised row keys and manifesting grouping of similar entities.
-
crslake 👍 1D, Better overall, harder to implement (but that is not stated as a constraint) https://cloud.google.com/bigtable/docs/schema-design-time-series#time-buckets
-
nadavw 👍 1there is a limit of 60 columns per row according to question. in addition in D the cost will be a lower which is a requirement. so D seems more suitable.
-
AzureDP900 👍 1C. Create a narrow table in Bigtable with a row key that combines the Computer Engine computer identifier with the sample time at each second
-
SamuelTsch 👍 1 Answered Cjust like psu said. Additionally for a time-series data, it it usually the best practice to combine the identifier + time, not the values.
-
shangning007 👍 1 Answered CEven though I am sure the answer is C, but I am not sure why it will help avoid being charged for every query?
Reader comments & corrections
No reader corrections yet — spotted an error or have a note? Share it below.