BigQuery

BigQuery's Serverless Model and Slot-Based Editions

Google BigQuery 1 has no clusters to size. Its Dremel engine splits each query into stages that run on slots, units of virtual CPU drawn from a shared pool, over columnar files in Google's Colossus file system. You choose how to pay for the slots:

Storage costs about $0.023 per GiB-month for active and $0.016 for long-term (90 days unmodified) logical bytes, with the first 10 GiB free. On-demand suits spiky, light use; a reservation suits steady load, since a query that scans little but runs long is cheap on one model and expensive on the other. On-demand, the table layout is the cost control:

A partitioned, clustered BigQuery fact table (from documentation, not run here)SQL
CREATE TABLE booknest.fact_sales (
  order_date DATE, genre STRING, country STRING, qty INT64, gross_amount NUMERIC)
PARTITION BY order_date
CLUSTER BY genre, country
OPTIONS (require_partition_filter = TRUE);   -- refuse queries that would scan every day

A dry run (bq query --dry_run) reports a query's bytes before you pay for them.