[英]BigQuery - BI Engine measuring savings
I have deployed BI Engine in one of my Google projects and I am measuring cost savings using the following query我已经在我的一个 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
;
However, I noticed that very often I have accelerated queries (bi_engine_statistics.bi_engine_mode = 'FULL') for which 'total_bytes_billed = total_bytes_processed'.但是,我注意到我经常加速查询 (bi_engine_statistics.bi_engine_mode = 'FULL'),其中 'total_bytes_billed = total_bytes_processed'。 I was expecting that for accelerated queries total_bytes_billed should be equal to zero which does not seem to be the case.
我期望对于加速查询 total_bytes_billed 应该等于零,但似乎并非如此。
So the questions are:所以问题是:
QUERY
cannot be used for BI Engine, so it's somewhat unfair to keep counting them in.QUERY
类型的查询不能用于 BI Engine,因此继续计算它们有点不公平。sum(total_bytes_processed) / pow(1024, 4) AS TB_processed
bi_engine_mode='FULL'
queries have savings:bi_engine_mode='FULL'
查询都节省了:SELECT
total_bytes_processed,
total_bytes_billed,
bi_engine_statistics
FROM `my_project_id.region-eu.INFORMATION_SCHEMA.JOBS`
WHERE 1=1
and bi_engine_statistics.bi_engine_mode = 'FULL'
and total_bytes_processed = total_bytes_billed
and total_bytes_processed > 0
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.