SQL优化案例
更新时间 2025-02-05 09:37:23
最近更新时间: 2025-02-05 09:37:23
- count(distinct xx)优化
- 调大work_mem减少I/O
- not in改写为anti join或not exists
- 分布键join+limit优化
- 非分布键 join通常使用hash join性能更好
- exists子句在大数据量场景调大work_mem性能更好
- 重新聚簇表
- now()导致分区不能剪枝问题优化