presto查询调优
调优维度:
SQL
presto参数配置(内存,并发,调度)
实 现:
SQL : 1 不要使用select *
2 approx_distinct(x)代替count(distinct x)
3 join 大表放在前面:presto左侧大表拆分到各个节点,右表数据发送到大表各个节点上进行join
4 少用order by
走着 走着 就近了,所以不要停止前行!
调优维度:
SQL
presto参数配置(内存,并发,调度)
实 现:
SQL : 1 不要使用select *
2 approx_distinct(x)代替count(distinct x)
3 join 大表放在前面:presto左侧大表拆分到各个节点,右表数据发送到大表各个节点上进行join
4 少用order by