Reducing BigQuery Costs: How We Fixed A $1 Million Query - Shopify
Nov 3, 2022

Summary
This post details the investigation and resolution of a BigQuery query that was projected to cost nearly $1 million USD per month. The primary solution involved implementing table clustering on two feature columns identified in the query's WHERE clause, which reduced the billed data scanned from 75 GB per query to 108.3 MB per query, a reduction of over 150x. Additional tips for reducing BigQuery costs include avoiding SELECT*, partitioning tables, and using table preview options instead of running queries for exploration.