漏斗计算太慢了,请问有类似CK的漏斗计算函数嘛?

通过以下sql进行漏斗查询时,耗时很长。
mysql> with f0 as(select distinct date_time, user_id from v_event where dt between ‘2022-03-21’ and ‘2022-03-28’ and event in(‘start’) and user_id != 0 and user_id is not null ),f1 as(select distinct date_time, user_id from v_event where dt between ‘2022-03-21’ and ‘2022-03-28’ and event in(‘download’) and user_id != 0 and user_id is not null )
-> select date_trunc(‘day’,f0.date_time) dt, count(distinct f0.user_id) n0,count(distinct f1.user_id) n1 from f0 left join f1 on f0.user_id = f1.user_id and f1.date_time between date_add(f0.date_time,interval 1 second) and date_add(f0.date_time,interval 86400 second)
-> group by GROUPING SETS (( date_trunc(‘day’,f0.date_time)), ()) order by n0 desc,n1 desc limit 1000;
±--------------------±--------±-------+
| dt | n0 | n1 |
±--------------------±--------±-------+
| NULL | 1003857 | 318540 |
| 2022-03-27 00:00:00 | 758836 | 242447 |
| 2022-03-28 00:00:00 | 304953 | 70735 |
| 2022-03-26 00:00:00 | 142463 | 33964 |
| 2022-03-25 00:00:00 | 67708 | 9194 |
| 2022-03-24 00:00:00 | 46742 | 7223 |
| 2022-03-23 00:00:00 | 2858 | 32 |
| 2022-03-22 00:00:00 | 2505 | 7 |
| 2022-03-21 00:00:00 | 1613 | 3 |
±--------------------±--------±-------+
9 rows in set (11.68 sec)

请问有类似clickhouse中的
https://github.com/ClickHouse/ClickHouse/blob/19.17/src/AggregateFunctions/AggregateFunctionWindowFunnel.h 漏斗函数支持嘛?
这样也不需要写很复杂的sql来进行漏斗计算,计算的时候也会比较快速。

当前版本2.1.2 单节点32c 64G,start事件数据量在1千3百多万条,download数据量在80万条。

@U_1635824715625_4752同问,也碰到漏斗分析的问题

不是有window_funnel函数吗