Paste a query and the analyzer estimates what it scans and flags the patterns it can detect statically. It runs in your browser.
BigQuery cost anti-patterns
The patterns that make BigQuery queries cost more than they need to, each with its mechanism, arithmetic and fix.
The analyzer can detect eleven of them from your SQL; three are patterns no single query can reveal.
What SELECT * actually costs in BigQuery
highBigQuery bills the columns you read, not the rows you return. So SELECT * is the most expensive way to write any query.
LIMIT does not reduce BigQuery query cost
mediumAdding LIMIT 10 to a query changes what you see, not what you are billed. It is the most common cost misconception in BigQuery.
Querying a partitioned table without a partition filter
highA partitioned table with no filter on its partition column scans every partition. That is usually the single largest avoidable cost in a BigQuery estate.
A partition filter that looks like pruning but is not
highFiltering the partition column against a subquery or a joined column does not prune anything. BigQuery has to read every partition to evaluate it.
Wildcard tables without a _TABLE_SUFFIX filter
highA wildcard table pattern with no _TABLE_SUFFIX constraint reads every matching table, which for daily-sharded data means the entire history.
A CTE referenced more than once may be evaluated more than once
mediumBigQuery does not promise to compute a WITH clause once. A CTE used in three places may read its tables three times; check with a dry run.
Self-joins where a window function would do
mediumJoining a table to itself may read it twice; check with a dry run. A window function reads it once and is usually faster as well.
CROSS JOIN and joins with no equality condition
highA join without an equality condition produces the Cartesian product. It rarely ends in a bill, it usually ends in a failed query after burning a lot of slot time.
The 10 MB minimum, multiplied by many small tables
lowBigQuery bills at least 10 MB per table referenced per query. Join forty lookup tables and you have bought 400 MB before reading any real data.
ORDER BY without LIMIT on a large result
mediumA top-level sort with no LIMIT forces the whole result through a single worker. It is the most common cause of "resources exceeded".
COUNT(DISTINCT) where an approximation would do
lowExact distinct counts require a full shuffle. APPROX_COUNT_DISTINCT is typically within 1% and dramatically cheaper in slot time.
What a SELECT * view costs in BigQuery
mediumnot detectable from one queryA SELECT * view bills only the columns each query takes from it. It costs extra when readers select every column, as BI tools often do.
The same query, over and over, uncached
mediumnot detectable from one queryRepetition is where BigQuery bills add up. A $2 query on a 15-minute schedule is $5,760 a month.
Rewriting a table resets it to active storage pricing
lownot detectable from one queryData untouched for 90 days drops to roughly half price automatically. A write resets the clock: for the whole table, or for one partition of a partitioned table.
Find these across every query you run, not one at a time.
Finitizer scans your whole BigQuery job history for these patterns, ranks them by what they actually cost you, and shows the rewritten query beside the original.
See how Finitizer works