Topic 1 Question 169
You are migrating a table to BigQuery and are deciding on the data model. Your table stores information related to purchases made across several store locations and includes information like the time of the transaction, items purchased, the store ID, and the city and state in which the store is located. You frequently query this table to see how many of each item were sold over the past 30 days and to look at purchasing trends by state, city, and individual store. How would you model this table for the best query performance?
Partition by transaction time; cluster by state first, then city, then store ID.
Partition by transaction time; cluster by store ID first, then city, then state.
Top-level cluster by state first, then city, then store ID.
Top-level cluster by store ID first, then city, then state.
ユーザの投票
コメント(7)
- 正解だと思う選択肢: A
A. Partition by transaction time; cluster by state first, then city, then store ID.
👍 8AWSandeep2022/09/04 A Partitioning is obvious Clustering is already mentioned in the question past 30 days and to look at purchasing trends by state, city, and individual store
👍 5Atnafu2022/12/16- 正解だと思う選択肢: A
A is the answer.
https://cloud.google.com/bigquery/docs/partitioned-tables This page provides an overview of partitioned tables in BigQuery. A partitioned table is a special table that is divided into segments, called partitions, that make it easier to manage and query your data. By dividing a large table into smaller partitions, you can improve query performance, and you can control costs by reducing the number of bytes read by a query. You can partition BigQuery tables by:
- Time-unit column: Tables are partitioned based on a TIMESTAMP, DATE, or DATETIME column in the table.
https://cloud.google.com/bigquery/docs/clustered-tables Clustered tables in BigQuery are tables that have a user-defined column sort order using clustered columns. Clustered tables can improve query performance and reduce query costs.
👍 4zellck2022/11/30
シャッフルモード