BigQuery FinOps Query Pack

Who is running SELECT * against my biggest tables?

Find the queries reading every column when they need a handful.

Free to run — INFORMATION_SCHEMA scans no billable bytesChecked 4 Aug 2026

JOBS and TABLE_STORAGE are region-scoped.

-- Queries containing an unqualified SELECT *, ranked by what they billed.
SELECT
  user_email,
  COUNT(*)                                             AS runs,
  SUM(total_bytes_billed)                              AS total_bytes_billed,
  ROUND(SUM(total_bytes_billed) / POW(1024, 4) * 6.25, 2) AS est_on_demand_usd,
  ANY_VALUE(SUBSTR(REGEXP_REPLACE(query, r'\s+', ' '), 0, 300)) AS example_query
FROM `region-us`.INFORMATION_SCHEMA.JOBS_BY_PROJECT
WHERE creation_time >= TIMESTAMP_SUB(CURRENT_TIMESTAMP(), INTERVAL 30 DAY)
  AND job_type = 'QUERY'
  AND state = 'DONE'
  AND error_result IS NULL
  -- SELECT * but not SELECT * EXCEPT(...), which is usually deliberate.
  AND REGEXP_CONTAINS(UPPER(query), r'SELECT\s+\*')
  AND NOT REGEXP_CONTAINS(UPPER(query), r'SELECT\s+\*\s+EXCEPT')
GROUP BY user_email
ORDER BY total_bytes_billed DESC
LIMIT 50;

What it returns

runs
How many times this user ran a SELECT * query in the window.
est_on_demand_usd
Total on-demand cost of those runs, not the avoidable portion.

How to read it

  • Not every SELECT * is waste. `SELECT * FROM t LIMIT 10` against a clustered table is cheap, and `SELECT *` inside a CTE that a later stage prunes may cost nothing extra.
  • The avoidable amount is the difference between all columns and the columns actually used downstream — this query cannot see that. Treat the list as a starting point for review, not as a bill.
  • Grouping by user is deliberate: SELECT * is a habit, and habits are fixed by talking to people, not by rewriting one query.

Take it further

Run this once, or have it run every day.

Finitizer evaluates this class of question continuously against your live BigQuery estate, tracks how each number moves between runs, and turns findings into assigned tasks. Read-only and keyless.