Deal of The Day! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

Google Exam Professional-Data-Engineer Topic 2 Question 93 Discussion

Actual exam question for Google's Google Cloud Certified Professional Data Engineer exam
Question #: 93
Topic #: 2
[All Google Cloud Certified Professional Data Engineer Questions]

Your company's customer_order table in BigOuery stores the order history for 10 million customers, with a table size of 10 PB. You need to create a dashboard for the support team to view the order history. The dashboard has two filters, countryname and username. Both are string data types in the BigQuery table. When a filter is applied, the dashboard fetches the order history from the table and displays the query results. However, the dashboard is slow to show the results when applying the filters to the following query:

How should you redesign the BigQuery table to support faster access?

Show Suggested Answer Hide Answer
Suggested Answer: C

To improve the performance of querying a large BigQuery table with filters on countryname and username, clustering the table by these fields is the most effective approach. Here's why option C is the best choice:

Clustering in BigQuery:

Clustering organizes data based on the values in specified columns. This can significantly improve query performance by reducing the amount of data scanned during query execution.

Clustering by countryname and username means that data is physically sorted and stored together based on these fields, allowing BigQuery to quickly locate and read only the relevant data for queries using these filters.

Filter Efficiency:

With the table clustered by countryname and username, queries that filter on these columns can benefit from efficient data retrieval, reducing the amount of data processed and speeding up query execution.

This directly addresses the performance issue of the dashboard queries that apply filters on these fields.

Steps to Implement:

Redesign the Table:

Create a new table with clustering on countryname and username:

CREATE TABLE project.dataset.new_table

CLUSTER BY countryname, username AS

SELECT * FROM project.dataset.customer_order;

Migrate Data:

Transfer the existing data from the original table to the new clustered table.

Update Queries:

Modify the dashboard queries to reference the new clustered table.


BigQuery Clustering Documentation

Optimizing Query Performance

Contribute your Thoughts:

Jeffrey
1 days ago
I bet the support team is getting tired of waiting for those dashboard results. They should probably invest in a coffee maker.
upvoted 0 times
...
Paola
2 days ago
I'm just glad I don't have to worry about 10 PB of data. That's a lot of orders!
upvoted 0 times
...
Luisa
5 days ago
Option C is interesting, but I'm not sure it would be faster than partitioning. Partitioning just seems more straightforward for this use case.
upvoted 0 times
...
Javier
10 days ago
But clustering by country and partitioning by username could help reduce the data scanned when applying filters.
upvoted 0 times
...
Louann
12 days ago
Partitioning by _PARTITIONTIME could work, but it won't be very helpful for these specific filters. I'd go with option B.
upvoted 0 times
Emile
12 hours ago
Option B) Partition the table by country and username fields.
upvoted 0 times
...
...
Callie
20 days ago
I disagree, I believe partitioning the table by country and username fields would be more efficient.
upvoted 0 times
...
Kristine
22 days ago
Clustering the table by country and username sounds like a good option too. It might be more efficient than partitioning, especially if the filter values are not evenly distributed.
upvoted 0 times
...
Launa
24 days ago
I think partitioning the table by both country and username fields is the way to go. That should provide fast access to the data when applying the filters.
upvoted 0 times
...
Javier
29 days ago
I think we should cluster the table by country field and partition by username field.
upvoted 0 times
...

Save Cancel
az-700  pass4success  az-104  200-301  200-201  cissp  350-401  350-201  350-501  350-601  350-801  350-901  az-720  az-305  pl-300  

Warning: Cannot modify header information - headers already sent by (output started at /pass.php:70) in /pass.php on line 77