BigQuery's cost structure is primarily driven by two key factors: data storage and query processing.

Data Storage #

The cost associated with data storage involves maintaining the datasets within BigQuery. Here are the two types of storage BigQuery offers:

  • Active Storage: This refers to the storage cost of table data and partitioned tables that have been modified within the last 90 days.

  • Long-term Storage: If your table data hasn't been edited in more than 90 days, BigQuery automatically moves it to long-term storage, which is considerably less expensive than active storage.

Query Processing #

BigQuery's query processing costs are primarily determined by the amount of data scanned when executing a SQL command, not the quantity of data returned.

Two types of pricing models are available for query processing:

  • On-demand pricing: The cost is based on the amount of data processed by each query. No upfront commitment is required.

  • Flat-rate pricing: For consistent workloads and predictable costs, you can opt for flat-rate pricing where you get a stable monthly cost.

Streaming Inserts #

Real-time data streaming into BigQuery is another cost aspect to consider. These costs are based on the volume of data inserted.

Data Transfer and Export #

BigQuery doesn't charge for exporting data or transferring it into the service. However, there are costs associated with transferring data out of BigQuery if the amount surpasses a certain threshold.

BigQuery ML #

BigQuery ML's cost is computed based on the amount of data processed while building the ML models.

BigQuery Data Transfer Service #

This is a separate service which automates data movement from SaaS applications to BigQuery on a scheduled and managed basis. There are specific charges associated with this service.

Cost Control Measures #

BigQuery offers several ways to control costs:

  • Query cost control: You can set up custom cost controls at the project level or for individual users.

  • Data compression: BigQuery automatically compresses data, which can significantly reduce storage costs.

  • Partitioning and clustering: By organizing your data effectively using partitioning and clustering, you can optimize your query costs.

Remember, BigQuery's pricing can vary by geographic region and is subject to change. Always check Google's official documentation for the most up-to-date information.