【发布时间】:2022-12-10 23:41:34
【问题描述】:
我已经在我的一个 Google 项目中部署了 BI 引擎,我正在使用以下查询来衡量成本节省
with tbl
as
(
select creation_time, total_bytes_processed, total_bytes_billed,
5 * (total_bytes_processed / 1000000000000) as cost_projected,
5 * (total_bytes_billed / 1000000000000) as cost_actual
from `region-us`.INFORMATION_SCHEMA.JOBS_BY_PROJECT b
where 1=1
and job_type = "QUERY"
and creation_time >= '2022-05-10 11:30:00.000 UTC'
and creation_time <= '2022-05-10 19:00:00.000 UTC'
)
select sum(cost_projected) - sum(cost_actual) as savings
from tbl
where 1=1
;
但是,我注意到我经常加速查询 (bi_engine_statistics.bi_engine_mode = 'FULL'),其中 'total_bytes_billed = total_bytes_processed'。我期望对于加速查询 total_bytes_billed 应该等于零,但似乎并非如此。
所以问题是:
- 我的查询是衡量储蓄的正确方法吗?
- 使用 total_bytes_billed > 0 进行完全加速查询是否正常?
【问题讨论】:
标签: google-bigquery gcloud google-bi-engine