在 Snowflake 進行資料管線自動化
Emily Melhuish
Technical Curriculum Developer, Snowflake


存取路徑:Monitoring > Query History > [Select Query] > Query Profile 分頁

爆量 Join
未使用 ALL 的 UNION
UNION 上方加入彙總以移除重複寫入磁碟(Spill to Disk)
裁剪效率不佳
診斷查詢
SELECT
query_id,
bytes_spilled_to_local_storage,
bytes_spilled_to_remote_storage
FROM SNOWFLAKE.ACCOUNT_USAGE.QUERY_HISTORY
WHERE bytes_spilled_to_remote_storage > 0
ORDER BY bytes_spilled_to_remote_storage DESC
LIMIT 10;
ACCOUNT_USAGE.QUERY_HISTORY:保留 365 天的檢視表INFORMATION_SCHEMA.QUERY_HISTORY() 表格函式,保留 7 天

在 Snowflake 進行資料管線自動化