Skip to content
Finitizer
Estimate what a query costs before you run it

This recipe tells you what already happened. The analyzer takes a query you have not run yet and estimates what it will scan, in your browser.

Which partitioned tables have no partition expiration set?

Partitioned tables that will grow forever because nothing ages out.

Reads metadata only, a fraction of a cent to run (10 MB minimum)Reviewed against Google’s docs, 23 Oct 2026

Permissions. Needs bigquery.tables.get and bigquery.tables.list for COLUMNS, TABLE_OPTIONS, TABLE_STORAGE (BigQuery Metadata Viewer has them); bigquery.jobs.create to run any query (BigQuery Job User has it).

Pick the region your data is in: every INFORMATION_SCHEMA view here is qualified by region.

-- Partitioned tables lacking partition_expiration_days, in every dataset
-- of the region: COLUMNS and TABLE_OPTIONS take a region qualifier as well
-- as a dataset one.
WITH partitioned AS (
  SELECT DISTINCT table_schema, table_name
  FROM `region-us`.INFORMATION_SCHEMA.COLUMNS
  WHERE is_partitioning_column = 'YES'
),
expiring AS (
  SELECT DISTINCT table_schema, table_name
  FROM `region-us`.INFORMATION_SCHEMA.TABLE_OPTIONS
  WHERE option_name = 'partition_expiration_days'
)
SELECT
  p.table_schema,
  p.table_name,
  ROUND(s.total_logical_bytes / POW(1024, 3), 2)             AS logical_gib,
  s.total_partitions
FROM partitioned p
LEFT JOIN expiring e USING (table_schema, table_name)
LEFT JOIN `region-us`.INFORMATION_SCHEMA.TABLE_STORAGE s
       USING (table_schema, table_name)
WHERE e.table_name IS NULL
ORDER BY s.total_logical_bytes DESC;

What it returns

total_partitions
How many partitions exist. A large number with no expiry is unbounded growth.

How to read it

  • No expiration is often correct; it is only a finding when the data has a real retention limit that nobody encoded.
  • Setting partition_expiration_days deletes data permanently on a schedule. Confirm the retention requirement with whoever owns the data before setting it.
  • A table with thousands of partitions and no expiry is also a query-performance problem, not only a storage one.

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.

See how Finitizer works