Docs
Docs /SQL Editor /Query history
SQL EditorHistory

Query history

Every job your BigQuery projects ran (from Querylab.io, the Cloud Console, bq, Looker) in one searchable tab, with what it cost and a button to open it again with its results. A separate per-tab panel keeps versions of the query you're editing.

header → History
NameTimeQueryDurationProcessedBilledCost
1Annual Reports2026-02-14 17:04-- Annual Sales Report (FY…1.6min4.5 TB4.5 TB$28.13
2ML Pipeline2026-02-14 16:47-- ML Feature Export1.3min3.2 TB3.2 TB$20.00
3Cohort Analysis2026-02-14 16:22-- User Cohort Retention…1.1min2.8 TB2.8 TB$17.50
4Event Analysis2026-02-14 16:11SELECT DATE(event_timestamp) AS day, event_name, COUNT(*)…55.0s2.5 TB2.5 TB$15.63
5Segments2026-02-14 13:31SELECT segment, COUNT(*)…12.0s600.0 GB600.0 GB$3.75
6Maintenance2026-02-14 11:57UPDATE `acme-analytics-prod.…12.0s120.0 MB120.0 MB$0.00
12 50 1-50 of 75 rows
Rows come straight from BigQuery's job history, so the Console query you ran at lunch is here too.

Opening it

Click the clock icon in the header (tooltip History), or run Query history from the command palette. It opens as a full tab named Query History; the count next to the title is the number of loaded jobs and refreshes on click.

Where the rows come from

Three sources, switched with the SQL / API / Demo buttons above the list:

  • SQL (the default) reads region-us.INFORMATION_SCHEMA.JOBS_BY_USER, or JOBS_BY_PROJECT with All Users, and goes back 180 days. It’s a billed query. It’s dry-run first; over the 100 MB auto-run limit you get an approval screen with Allow and Change limit.
  • API calls jobs.list on every connected project, your jobs only, and goes back 30 days. It’s free. Jobs without query text (loads, copies, exports) are skipped.
  • Demo shows 75 sample queries. Playground only; SQL is unavailable there.

Whichever source, the tab first paints from a local cache of jobs you ran in this browser (pruned after 30 days), then loads the rest. Rows are 100 per page; the button becomes Load more at the end.

Finding a query

The search field takes free text and typed filters:

1
status:success type:SELECT cost:>1.00 date:7d

Keys: status, type, tab, cost, bytes, date, savings, query, user, project, cache, duration, rows, slots, destination, location, job. Operators >, <, >=, <=, =; byte units BTB; date shortcuts 1h, 24h, 7d, 30d, 90d. Free text matches the SQL, referenced tables, user email, error message, destination table and labels. The field autocompletes keys as you type.

The right-hand panel adds QUICK FILTERS (Status, Type, Tab, Labels, Savings; Tab is the Querylab.io tab a query ran from), a Project picker, a time range (Last 1 hour … Last 90 days, or custom), and Clear All Filters. The All / Savings switch narrows the columns to the cost-comparison set.

When a search matches more than the loaded pages can show, a banner offers Scan All History: it walks the remaining pages of every project until it has 50 matches, then Load Next 50 Results. Cancel any time. In SQL mode the search runs server-side instead, which is the faster route for anything older than a few days.

Reading a row

card view
Event Analysis success · 2 hours ago · bquxjob_5a1c…
SELECT DATE(event_timestamp) AS day, event_name, COUNT(*) AS cnt FROM acme-analytics-prod.raw_events.all_events WHERE … Show more
55.0s · 2.5 TB processed · 2.5 TB billed · 1.9 slot-hours · 1,204 rows · $15.63 · On-demand · Enterprise saves ~$14.20 · SELECT · US
Tables: raw_events.all_events

Two layouts, toggled with the list/grid icons: Compact is a grid with sortable columns (Name, Time, Query, Duration, Processed, Billed, Slots, Cost, Pot. Savings, Model, Type, Labels, Complexity, Location, Rows, Cache, Tables, Job ID) and a TOTAL row; Card shows the same data per job with the first five referenced tables as links that open the table’s entity tab. Name is the Querylab.io tab the query ran from, or the first 30 characters of the SQL for jobs run elsewhere.

In the grid, the chevron in the Query cell expands the full SQL. Clicking a card body does nothing; the actions are the icons:

row actions
  • Open in new tab opens a new query tab with the SQL; a recent successful job brings its results along.
  • Copy query puts the SQL on the clipboard.
  • Copy results table path copies the temporary results table, while it still exists (24 h). Card view only.
  • Open running job opens a tab attached to the live job, for running or pending jobs. Card view only.
  • Clicking a job ID copies it.

The grid toolbar copies the loaded rows to the clipboard or exports them as CSV. There’s no delete and no re-run: open the query in a tab and run it.

Pot. Savings and the Res. / OD model chips are the pricing comparison applied to each job.

Seeing usage over a period

Usage statistics is a separate tab, opened from the command palette as Usage statistics: total queries, total cost, data processed and cache-hit rate for a period, with cost and bytes over time, the ten most expensive queries, cost by user, statement types, and a slot-vs-on-demand savings summary. Same My Queries / All Users switch and the same billed INFORMATION_SCHEMA query with the same approval gate; default range is the last 30 days.

Versions of the query in a tab

The clock in the results toolbar (tooltip Query History), H, or the tab’s right-click menu open a different panel: the version history of this tab’s SQL.

results toolbar → Query History
Today
v8f2a · current · 14:32 · 1,204 rows · 55.0s · 2.5 TB · $15.63
v7c19 · 14:18 · valid · 2.5 TB
v61d0 · 13:51 · error · Unrecognized name: evnt_name
Yesterday
v5b77 · 17:04 · 980 rows · 41.2s · 2.4 TB · $15.00
Each dot is a version. Executed versions glow; size scales with bytes scanned.

A checkpoint is saved on every run and on any valid edit (at most one edit checkpoint per 30 seconds), up to 200 per tab. Filter by All / Runs / Errors; click a version for a read-only preview with an optional diff against the current or the previous version. Hover actions: Copy SQL, Open in new tab, View results (runs only, while the results table lives), Restore this version (restoring first checkpoints what you have now).

In the Playground

History opens on the Demo source with 75 sample jobs from acme-analytics-prod; queries you run in the Playground are merged in on top. API mode works; SQL mode doesn’t, because the sample project has no INFORMATION_SCHEMA access.