Understanding & Estimating Your BigQuery Costs Easily

Max Lukichev
Telmai
Published in
3 min readJun 17, 2024

Introduction

Google BigQuery is a powerful tool for efficiently storing, processing, and analyzing large volumes of data. However, managing BigQuery’s costs is crucial to avoid unexpected expenses and ensure smooth performance. This article will explain BigQuery’s pricing structure and share tips on effectively managing and reducing your BigQuery and overall cloud expenses.

Early Days of GCP

In the beginning, customers faced challenges in analyzing BigQuery costs. Exporting job logs to BigQuery for analysis was cumbersome and required setting up custom IAM roles, log sinks, and writing complex SQL queries.

Understanding What Drives Google BigQuery Costs?

The primary driver of costs in Google BigQuery is the amount of data you read. Excessive data reading, such as “SELECT *” in your queries, can lead to higher costs. BigQuery’s pricing is based on three main components: Storage Data, Long Term Storage Data, and Query Data Usage.

  • Storage Data: You are charged based on the data stored in the “active storage” tier at $0.02 per GB per month. Data not accessed for over 90 days moves to “long-term storage,” costing $0.01 per GB per month. Checking table sizes in your BigQuery dataset helps estimate storage costs.
  • Long-Term Storage Data: Data that remains unchanged for 90 days qualifies for long-term storage, cutting costs by 50% to $0.01 per GB per month. Updating the data reverts it to the normal storage rate, resetting the 90-day count. Querying or exporting does not count as updating, allowing the data to stay in long-term storage and save costs. For example, if 25% of your data remains static and only queried, you can reduce your storage costs from $10,000 to $8,750 monthly, saving $1,250 through long-term storage pricing.
  • Query Data Usage: Estimating query costs involves factors like the number of daily users, the number of queries each user runs, and the average data usage per query. For instance, if 150 users run 50 queries daily, each using 5 GB of data, the monthly usage would be:

150 users * 50 queries * 5 GB * 30 days = 1,125,000 GB (or 1,125 TB) per month.

At $5 per TB, this usage costs about $5,625 monthly. Including storage costs, the total expense could be around $14,375 per month.

Effective Cost Estimation Practices

Discover key practices to optimize your data operations and reduce costs with efficient queries and infrastructure management.

  1. Optimize Queries and Use Partitioning: Efficient queries lower data processing costs. Use appropriate filters, aggregates, and optimizations, avoiding “SELECT *” to read only necessary columns. Utilize partition filters to minimize resource usage. Partitioning data by time, geography, or other factors can significantly cut query costs by reducing the data scanned.
  2. Clustering Data: Use clustering keys to minimize data scanned during queries. Clustering organizes data to improve query performance and save on processing costs.
  3. Regularly Review: Monitor data infrastructure bottlenecks and understand pipeline failures and their business impact. Use available tools and dashboards to analyze costs and identify optimization opportunities.
  4. Sign up for Telmai’s Free Data Quality Health Assessment:
    Gain crucial insights into your key business tables and attributes to elevate data quality across your data lake and warehouse. Our no-cost, comprehensive report provides a detailed analysis of vital Data Quality KPIs, including completeness, freshness, uniqueness, and anomaly detection.
    Discover data infrastructure bottlenecks, understand pipeline failures and their business impact, and receive strategic recommendations for improving data quality and managing infrastructure costs effectively. Take advantage of Telmai’s expert analysis today to optimize your data operations.

Ensure your data pipelines are efficient and cost-effective with Telmai’s expert analysis. Click here to get your Data Health Analysis today at no cost.

This featured article was originally published on Telmai’s official blog.

--

--