[英]BigQuery - BI Engine measuring savings
我已經在我的一個 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 應該等於零,但似乎並非如此。
所以問題是:
QUERY
類型的查詢不能用於 BI Engine,因此繼續計算它們有點不公平。sum(total_bytes_processed) / pow(1024, 4) AS TB_processed
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.