Cloud Technology

What are the best practices for BigQuery cost optimization and improving query performance?

JA Asked by Jason Bennett · 10-08-2023
0 upvotes 16,851 views 0 comments
The question

Our BigQuery costs have been rising significantly as our data lake grows. We are currently using a lot of "SELECT *" statements and have massive tables without any partitioning. What are the most effective BigQuery optimization strategies for reducing data processed and utilizing Slots or Physical Storage billing to bring down our monthly GCP bill?

3 answers

0
LI
Answered on 12-08-2023

You need to implement Partitioning and Clustering immediately. Partitioning by a timestamp column allows BigQuery to skip scanning irrelevant data, which directly reduces cost. Clustering further organizes data within those partitions. Also, stop using "SELECT *"! Always specify columns to minimize the bytes read. I also suggest looking into the BigQuery BI Engine for sub-second dashboard performance. Finally, check your Query Reservations; moving from on-demand to capacity-based pricing (Slots) can be cheaper if your daily usage is consistently high.

0
J
Answered on 14-08-2023

 

Have you tried using the BigQuery Slots Estimator to see if a capacity-based commitment would actually save you money over the on-demand model?

T 16-08-2023

The Slots Estimator is a lifesaver. It analyzes your historical metadata to predict if Editions (Standard, Enterprise, or Plus) would be more cost-effective. For many of our clients at iCertGlobal, switching to the Autoscale feature within the Enterprise edition provided the right balance between performance and cost without having to manually manage slot commitments 24/7.

0
P
Answered on 17-08-2023

Don't forget to set up Query Limits at the project or user level to prevent a single "rogue" query from eating up your entire budget.

LI 18-08-2023

Great advice, Patricia. Setting a "Maximum bytes billed" for queries is the ultimate safety net for any data team dealing with junior analysts.

Share your thoughts

Your email address will not be published. Required fields are marked (*)

Professional Counselling Session

Still have questions?
Schedule a free counselling session

Our experts are ready to help you with any questions about courses, admissions, or career paths. Get personalized guidance from industry professionals.

Request a Call Back

Search Online

We Accept

We Accept

Follow Us

"PMI®", "PMBOK®", "PMP®", "CAPM®" and "PMI-ACP®" are registered marks of the Project Management Institute, Inc. | "CSM", "CST" are Registered Trade Marks of The Scrum Alliance, USA. | COBIT® is a trademark of ISACA® registered in the United States and other countries.

Book Free Session