Slide 24
Slide 24 text
© ZOZO, Inc.
24
Physical Storage課金の場合の費用計算方法
SELECT
*,
(active_without_time_travel_physical_tb + time_travel_physical_tb + fail_safe_physical_tb) * 40 +
long_term_physical_tb * 20 AS monthly_physical_cost_usd,
FROM (
SELECT
table_schema AS dataset_name,
SUM(active_physical_bytes - time_travel_physical_bytes) / POW(2, 40) AS active_without_time_travel_physical_tb,
SUM(long_term_physical_bytes) / POW(2, 40) AS long_term_physical_tb,
SUM(time_travel_physical_bytes) / POW(2, 40) AS time_travel_physical_tb,
SUM(fail_safe_physical_bytes) / POW(2, 40) AS fail_safe_physical_tb,
FROM `プロジェクト ID`.`region-us`.INFORMATION_SCHEMA.TABLE_STORAGE
GROUP BY table_schema
)
● 過去データに対する課金が発生するため要注意
○ 過去データにはTime travelとFail safeの2種類が存在
○ DROPされたテーブルも課金対象