查詢Account用了多少Credit
只有你的帳號Role是 ACCOUNTADMIN 才可以查詢
- 透過Web (Account->Usage)
- 透過SQL
select *
from table(information_schema.warehouse_metering_history(dateadd('days',-10,current_date())));
- 透過SQL(Viewing Data Usage for Your Account)
select *
from table(information_schema.database_storage_usage_history(dateadd('days',-10,current_date()),current_date()));select *
from table(information_schema.stage_storage_usage_history(dateadd('days',-10,current_date()),current_date()));
- 透過SQL(Viewing Data Usage for a Table)
show tables like '%emp%' in sfe_tuts.public;show tables history in sfe_tuts.public;select * from information_schema.TABLE_STORAGE_METRICS;
注意事項:1.用SQL所顯示Table的bytes資訊,會在如果有query是掃整張Table的時候更新,所以所顯示的資訊有可能會和實際儲存的檔案大小有落差2.Clone的Table不會利用到額外的儲存空間,除非有新的Row增加,或是Update或delete的情況發生,所以有可能顯示的Table資訊會大於實際的physical bytes3.在Table中被刪除的資料不會顯示在Table的資訊中,被刪除的資料會被儲存在Snowflake中直到Travel retetion的時間到期,所以在這段期間內,Table所顯示的檔案大小有可能小於實際的存儲大小
學習到的單字
- contractual (adj) 契約的
- obligation (n) 責任;義務
- unprecedented (adj) 史無前例的
- accommodate (v) 使相符
- resume (v) 重新開始;繼續
Reference