Slot Contention and Query Queueing in BigQuery

A diagnostic path for telling BigQuery slot waits from overuse.

· 8 min read
Cover illustration for “Slot Contention and Query Queueing in BigQuery”
BigQuery Slot Management · November 27, 2026 · 8 min read · 1,809 words

Slot contention and query queueing in BigQuery are rooted in how its slot model distributes compute. The clearest path to fixing them is to distinguish work waiting for capacity from work consuming too much of it. Teams may need better queries to reduce consumption, or different workload boundaries, a concurrency change, or more compute to reduce waiting.

How BigQuery allocates compute through slots and what happens when demand exceeds supply

BigQuery executes queries through slots, which are virtual compute units assigned to query stages by its scheduler. Before a stage can work, it needs slots. The fair-share scheduler distributes available compute across competing work, but it cannot make demand disappear when supply is exhausted. A queue holds queries waiting to run, while work within executing queries can also wait for slots. Those are related delays, but they need different diagnostic signals.

Slot supply comes through two regimes. On-demand projects use a shared project-level pool, with a concurrent slot limit for each project. Once demand reaches that limit, more queries queue. That is designed behavior. Reservation-based projects using BigQuery Editions use the capacity they have bought and lose access to the shared on-demand pool after switching.

A reservation therefore defines the compute available to its assigned workloads, but slot supply is not the only constraint on admission. BigQuery also applies a concurrency target that governs how many queries can run together. To understand a delay, identify which constraint the workload has reached.

The five structural causes that push a workload into contention

The first cause is on-demand pool exhaustion, where high analyst concurrency or heavy ETL reaches the project's concurrent slot limit and forces subsequent queries to queue. The second is reservation undersizing after a move to Editions. That transition changes the source of available compute. If the capacity bought covers only part of peak demand, the shared pool is no longer there to take the extra work, so that work waits.

The third cause is an assignment hierarchy misconfiguration, where a project sits outside the organization or folder path that inherits a reservation. Projects within the assigned path inherit the reservation, while projects outside it do not. A project on the wrong path can therefore receive zero slots and have all its queries queue.

The fourth cause is mixing batch and interactive workloads in one reservation, allowing long-running ETL jobs to consume the slots that short dashboard queries need. Interactive scheduling priority helps only at dispatch time, leaving active batch jobs holding slots for minutes or hours.

The fifth cause is a concurrency limit that admits too few queries even when slots are idle. Reservations default to a dynamically computed target, represented by target = 0, but administrators can set a manual maximum concurrency target. Google Cloud's query queue documentation calls that setting a soft upper bound meant to ensure that each query gets a minimum number of slots. With many small BI queries, that bound can become the bottleneck even when compute is available.

What queuing actually does to pipelines, dashboards, and costs downstream

A queued query can produce no error, just a growing wait. That silence makes the cause easy to misread. Dashboards in Looker, Tableau, or Data Studio stop refreshing, while delayed ETL leaves the underlying data stale. When scheduled queries miss their windows, downstream dependencies can break. Engineers encountering the resulting timeouts may investigate query bugs before recognizing the resource constraint.

For dashboard users, the wait can overwhelm the actual work. A query that normally completes quickly can spend many minutes waiting when concurrent refreshes saturate a reservation. Perceived latency grows sharply once the queue builds, rather than increasing in a simple proportion to demand. The user sees one slow dashboard, though the wait may start with unrelated work that shares its compute.

Retries can then turn a latency problem into a cost problem. Resubmitting a timed-out query creates a duplicate queue entry if the original job remains there. Both jobs can eventually execute, consuming slots for the same logical request and inflating measured demand. The reservation then looks too small for the workload, which can lead a team to buy capacity that pays in part for duplicate work.

At peak workloads, shuffle operations alone can use up to 60% of a reservation's available slots, leaving other query work short of slots before the growing queue is easy to spot. Buying more slots without addressing unnecessary shuffle, missing partition filters, or mixed workloads can therefore raise bills without a proportional gain in throughput. The expensive consequence is not just waiting, but mistaking avoidable demand for a permanent capacity requirement.

The monitoring signals that distinguish contention from other query slowness

Diagnosis starts with two INFORMATION_SCHEMA views because compute use and waiting work are recorded separately. INFORMATION_SCHEMA.JOBS provides one row per job, including total_slot_ms, state, reservation_id, and error details. It identifies the largest compute consumers and the reservation each job used. INFORMATION_SCHEMA.JOBS_TIMELINE provides one row per job per second of execution, including period_slot_ms and period_estimated_runnable_units. The latter is the key contention signal: work that is ready to run but waiting for slots.

To relate that waiting work to capacity, the illustrative aggregation is SUM(period_slot_ms), grouped by minute and reservation. Its units need care. Summed slot milliseconds are consumption over an interval, so the comparison must express reservation capacity over the same interval. When consumption consistently reaches available capacity and period_estimated_runnable_units is nonzero, work is being held back by slot supply. That establishes contention, although inefficient queries may still be responsible for exhausting the supply.

To examine admission delays, the job-level pattern uses WHERE state IN ('PENDING', 'RUNNING') and TIMESTAMP_DIFF(start_time, creation_time, SECOND) AS queue_seconds. Pending jobs are work still waiting to start. For jobs that have started, the timestamp difference measures their wait before execution. Long queue times followed by low total_slot_ms suggest that capacity or concurrency limits are holding work back, while high total_slot_ms with short queue times suggests that the queries need tuning. Reading those columns together avoids treating all elapsed time as execution time.

Cloud Monitoring shows slot utilization for each reservation and updates it every 60 seconds, so teams can use it for dashboards and alerting. The schema views serve a different purpose. Their detail for each job and each second lets a team link a utilization peak to the jobs, reservations, and waiting work behind it.

The four remediation levers and the order in which to apply them

Diagram: Four Remediation Levers: Apply in Order. Visualizes: Show a ranked sequence of four remediation levers for BigQuery slot contention, applied in strict order from cheapest to most expensive.

Teams should apply the cheaper fixes first and escalate only when monitoring shows they are insufficient. The first lever is separating batch and interactive workloads into different reservations. This keeps long-running ETL from using the slots assigned to dashboards, without the need to buy more capacity. It changes which workloads can interfere with each other. If that separation removes the queue, the compute boundary caused the delay despite an adequate total slot budget.

If contention remains, the second lever is reducing demand from the largest slot consumers. Rank jobs from INFORMATION_SCHEMA.JOBS with ORDER BY total_slot_ms DESC, then address missing partition filters, full-table scans, and unnecessary shuffles in those queries. Monitoring afterward shows whether remaining peak demand still exhausts supply or whether the expensive queries were the main cause.

The third lever is deliberate control of autoscaling bounds. A lower autoscale_max_slots can introduce controlled queueing rather than allowing a short burst to trigger a large scaling event. This is a cost guardrail. Autoscaled capacity has a minimum billing window of a full minute, even when the work finishes sooner. A slightly longer wall-clock query time may be a fair trade for avoiding that extra charge.

The fourth lever applies when queries still queue despite slot headroom. In that case, raising a maximum concurrency target that is too low lets more queries share the slots already in the budget. Google Cloud's queue documentation covers CREATE RESERVATION DDL and ALTER PROJECT SET OPTIONS for concurrency and queue-timeout controls. It also documents a queue timeout of -1, which disables queueing and returns ADMISSION_DENIED errors instead, a valid choice for interactive workloads with strict response-time requirements.

More baseline slots become justified only after the first three levers have been applied and peak monitoring still shows saturated capacity. Idle slots call for a different response.

Why AI agent workloads make slot contention structurally harder to manage in BigQuery

Human analysts tend to submit work in clusters, including business hours, dashboard refreshes, and ad-hoc bursts, with idle periods between them. BigQuery's fair-share scheduler and autoscaler were designed around that pattern. Agents can query at high rates without a break and need short response times each time. The average is not enough for this workload. A response that sometimes arrives quickly and sometimes waits a long time can make an agent feel broken to its user.

That pattern also changes the billing consequences of autoscaling. Autoscaled slots are billed for a minimum of 60 seconds, even if a job completes sooner. Many short agent queries can trigger scaling events again and again, and each is billed for at least that minimum period.

On-demand pricing creates a separate tension for speculative exploration. An agent testing a hypothesis or exploring a schema may return only a small result, but each query still incurs the minimum scan charge. When probing is a routine part of how an agent works, the sustained query rate becomes central to the economics.

In shared reservations, an agent burst can saturate slots and queue analyst dashboards, while analyst queries can make agents wait, depending on submission order and fair-share state. Neither workload has predictable access to compute under that arrangement. The earlier fixes can still help, but demand without breaks and strict latency requirements make isolation and billing harder to deal with through tuning alone.

What teams outgrowing BigQuery's slot model typically want from an alternative

A team whose contention disappears after workload separation and query tuning has a strong reason to finish that work in BigQuery. Migration has real costs in SQL dialect, schema design, and operational change. A queue alone is not a migration case. The case becomes stronger when slot costs grow faster than the value of the queries they serve, despite the configuration and query fixes already described.

BigQuery separates storage from compute, yet resolving contention through more slots still ties additional throughput to additional purchased capacity. Teams outgrowing that arrangement typically want read compute that scales without copying data, isolation between interactive, ETL, and agent work without manual reservation carving, and predictable per-compute-hour pricing. The aim is control over which workloads share resources and how their query rates affect cost.

One option for those needs is ObsessionDB, a managed service that separates compute from storage and lets teams give workloads their own compute so heavy pipelines do not queue interactive queries. It also provides isolated read-only compute for agents and capacity-based pricing.

An alternative earns consideration when isolation and cost remain unresolved after BigQuery's practical fixes.

More in BigQuery Slot Management