You run a query in BigQuery that scans 10 GB of data. Your project has a flat-rate pricing plan of 200 slots. What will be the cost behavior for this query?
Think about how flat-rate pricing works compared to on-demand pricing in BigQuery.
With flat-rate pricing, you pay a fixed monthly fee for a set number of slots. Queries use these slots without additional cost per data scanned. So scanning 10 GB does not add extra cost beyond the flat rate.
You have a large dataset with sales data including a sale_date column. You want to optimize query performance and cost for queries filtering by date ranges. Which partitioning strategy should you choose?
Consider which partitioning method allows filtering by an existing date column efficiently.
Column-based partitioning on sale_date allows queries filtering by date ranges to scan only relevant partitions, improving performance and reducing cost. Ingestion time partitioning partitions by load time, which may not align with sale_date.
You want to restrict access so that a user can only query a specific dataset but cannot see other datasets in the project. Which IAM role and permission setup achieves this?
Think about least privilege and dataset-level permissions.
Granting roles/bigquery.dataViewer on the dataset limits the user to read data only in that dataset. Other roles at project level grant broader access.
Your application runs many small queries filtering on user ID and timestamp. Which table design improves query speed and reduces cost?
Consider which column is best for partitioning to reduce scanned data for time-based filters.
Partitioning by timestamp reduces scanned data for time filters. Clustering by user ID improves filtering on user ID within partitions, speeding queries and lowering cost.
You have a BigQuery reservation with 100 slots shared by multiple projects. If one project runs a large query using 80 slots and another project runs a small query, how does BigQuery allocate slots to the small query?
Think about slot reservations and guarantees in BigQuery.
BigQuery reservations can guarantee minimum slots per project. Even if one project uses many slots, others get their guaranteed minimum slots to run queries without waiting.