Dervin Thunk
Dervin Thunk

Reputation: 20119

Does Google BigQuery charge by processing time?

So, this is somewhat of a "realtime" question. I run a query and it's currently going at almost 12K seconds, but it told me This query will process 239.3 GB when run. Does BQ charge by the time besides the data processed? Should I stop this now?

Upvotes: 0

Views: 988

Answers (2)

winwiz1
winwiz1

Reputation: 3164

For on-demand queries you are charged for the amount of data processed by BigQuery engine and for expensive queries only you are charged extra for the complexity (which could manifest itself by increased query time).

The amount of data processed is reflected by totalBytesProcessed. And also by totalBytesBilled which is the same for ordinary queries. For complex/expensive queries you are charged extra for the complexity and technically it's done by totalBytesBilled becoming bigger than totalBytesProcessed.

More details: see this link

Upvotes: 0

Mikhail Berlyant
Mikhail Berlyant

Reputation: 172944

I assume you are using on-demand pricing model - you are billed based on amount of processed bytes and processing time is not involved

  • BigQuery uses a columnar data structure. You're charged according to the total data processed in the columns you select, and the total data per column is calculated based on the types of data in the column. For more information about how your data size is calculated, see data size calculation.

  • You aren't charged for queries that return an error, or for queries that retrieve results from the cache.

  • Charges are rounded to the nearest MB, with a minimum 10 MB data processed per table referenced by the query, and with a minimum 10 MB data processed per query. Cancelling a running query job may incur charges up to the full cost for the query were it allowed to run to completion.

  • When you run a query, you're charged according to the data processed in the columns you select, even if you set an explicit LIMIT on the results.

See more at BigQuery pricing

Upvotes: 1

Related Questions