关于查询未使用到异步物化视图

为了更快的定位您的问题,请提供以下信息,谢谢
【详述】问题详细描述
创建物化视图,查询没有利用到
【背景】无
【业务影响】
暂无
【是否存算分离】否
【StarRocks版本】3.2.3
【集群规模】例如:3fe(1 follower+2observer)+5be(fe与be混部)
【机器信息】CPU虚拟核/内存/网卡,例如:48C/64G/万兆
对应的物化视图创建和查询的SQL如下
异步物化视图
CREATE MATERIALIZED VIEW ride_view comment ‘骑行物化视图’
DISTRIBUTED BY RANDOM BUCKETS 10
REFRESH IMMEDIATE ASYNC AS
with point_info as (
select
fence_id
,area_name
,city_guid
from dim.dim_spt_fence_info
where 1 = 1
and pt = CURDATE()+0
and is_delete = 0
and area_type in (116)
)

select
a.*,b1.area_name as bike_start_park_name,b2.area_name as bike_end_park_name
,c.ride_type
from
(select
*,
1 as order_cnt,
user_new_id as userid
from dwd.dwd_trd_ord_bik_ride_ent_di
where pt >= URDATE()-372
and is_td_start = 1
)a
left join point_info b1
on a.bike_start_park_guid = b1.fence_id
left join point_info b2
on a.bike_end_park_guid = b2.fence_id
left join
(
select ride_id
,case when pay_stracture in (‘singlecharge_notpaycoupon_notfree’,‘singlecharge_notpaycoupon_free_without_shorttime’) then ‘单次付费’
when pay_stracture in (‘timecard_not_zero_pay_amt’,‘timecard_zero_pay_amt’) then ‘次卡骑行’
when pay_stracture in (‘monthcard_not_zero_pay_amt’,‘monthcard_zero_pay_amt’) then ‘月卡骑行’
when pay_stracture in (‘singlecharge_paycoupon_notfree’,‘singlecharge_paycoupon_free’) then ‘优惠券骑行’
else ‘其他骑行’ end as ride_type
from dwd.dwd_trd_ord_bik_ride_extend_di
where pt >= CURDATE()-372
)c
on a.ride_id = c.ride_id

查询语句
select ride_type from (
with point_info as (
select
fence_id
,area_name
,city_guid
from dim.dim_spt_fence_info
where 1 = 1
and pt = ‘20240509’
and is_delete = 0
and area_type in (116)
)

select
a.*,b1.area_name as bike_start_park_name,b2.area_name as bike_end_park_name
,c.ride_type
from
(select
*,
1 as order_cnt,
user_new_id as userid
from dwd.dwd_trd_ord_bik_ride_ent_di
where pt >= ‘20220301’
and is_td_start = 1
)a
left join point_info b1
on a.bike_start_park_guid = b1.fence_id
left join point_info b2
on a.bike_end_park_guid = b2.fence_id
left join
(
select ride_id
,case when pay_stracture in (‘singlecharge_notpaycoupon_notfree’,‘singlecharge_notpaycoupon_free_without_shorttime’) then ‘单次付费’
when pay_stracture in (‘timecard_not_zero_pay_amt’,‘timecard_zero_pay_amt’) then ‘次卡骑行’
when pay_stracture in (‘monthcard_not_zero_pay_amt’,‘monthcard_zero_pay_amt’) then ‘月卡骑行’
when pay_stracture in (‘singlecharge_paycoupon_notfree’,‘singlecharge_paycoupon_free’) then ‘优惠券骑行’
else ‘其他骑行’ end as ride_type
from dwd.dwd_trd_ord_bik_ride_extend_di
where pt >= ‘20220301’
)c
on a.ride_id = c.ride_id
) as t limit 1

辛苦发个profile 怎么判断的没利用上呢