Professional Data Engineer · Free Practice Question Medium
Question 7
Your BigQuery costs are higher than expected. You want to help data analysts using the BigQuery data warehouse reduce overall costs. Which of the following would you recommend? (choose 2)
- A Avoid using SELECT *
- B Avoid using partitioned tables
- C Avoid using clustered tables
- D Use LIMIT only with clustered tables
- E Use the bq --estimate-bytes command to estimate the number of bytes read
Reveal correct answers
Correct answers: A, D
Explanation
SELECT * can scan large amounts of data and should be avoided. Using LIMIT only with clustered tables can reduce the amount of data scanned. Using LIMIT on non-clustered tables does not limit the number of bytes scanned. Partitioning and clustering can both help limit the amount of data scanned and therefore help reduce costs. The bq command to estimate the number of bytes scanned is bq --dry_run, not --estimate_bytes. See https://cloud.google.com/bigquery/docs/best-practices-performance-overview
Discussion
Think the marked answer is wrong, or have a better explanation? Share it below — comments appear after review.
You must be logged in to post a comment.
