Snowflake 中的数据管道自动化
Emily Melhuish
Technical Curriculum Developer, Snowflake


访问路径:Monitoring > Query History > [选择查询] > Query Profile 选项卡

爆炸性连接
不带 ALL 的 Union
UNION 上方添加聚合以去重磁盘溢出
裁剪低效
诊断查询
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 中的数据管道自动化