How to accelerate median calculation on large tables

Dear All,

can Median calculation be accelerated using reflections?
thank you for your help.

best regards
Jaro

Yes. You can wrap the query in a view, create a raw reflection on the view and then directly query the view. It’s basically a materialized view.

Otherwise, it’s a lot harder to use a reflection with median because we have to re-write the query to use a window function on a join.