Hi, i have to calculate multiply(10,20…90) percentiles for the same column.
i am using PERCENTILE_DISC N times in my SELECT.
The issue is that it makes my query almost N times slower.
From execution plan looks like each individual PERCENTILE_DISC call produces same steps multiply times => hash_partition, window, external_sort and etc. For the same column it seems redundant.
It makes my query executing forever.
Is there a way to speed up my query? We are on Dremio 24.0.1-202303312317430103-9ff7aeed AWS(activated).
- will dremio
approx_percentile
be much faster to use? - in Athena we used
approx_percentile(*x* , *percentages* ) → array<[same as x]>
which gives you possibility to calculate multiply percentile at once.