存算分离物化视图占用s3存储过大问题

为了更快的定位您的问题,请提供以下信息,谢谢
【详述】使用存算分离机群,发现分区物化视图占用s3存储很大,一个空的分区视图下面的文件目录有近几十万+,
【背景】做过哪些操作?
【业务影响】
【是否存算分离】是
【StarRocks版本】3.3.0-rc01
【集群规模】例如:3fe(1 follower+2observer)+5be(fe与be混部)
【机器信息】CPU虚拟核/内存/网卡,例如:48C/64G/万兆
【联系方式】为了在解决问题过程中能及时联系到您获取一些日志信息,请补充下您的联系方式,例如:社区群4-小李或者邮箱,谢谢
【附件】

CREATE MATERIALIZED VIEW t_ssp_uv
partition by log_time
REFRESH ASYNC
PROPERTIES(
“partition_ttl_number” = “365”,
“partition_refresh_number” = “2”
) as
SELECT
date_trunc(‘day’,
ad.c.indate) AS log_time,
ad.c.ymd,
coalesce(ad.c.channelid, 0) AS channelid,
coalesce(ad.c.adsid, 0) AS slot_id,
coalesce(ad.c.adid, 0) AS ad_id,
coalesce(ad.c.keyid, 0) AS key_id,
coalesce(ad.c.materialid, 0) AS ma_id,
bitmap_union_int(ad.c.deviceid) AS uv,
bitmap_union_int(ad.c.ip) AS ip
FROM
ad.dw_ad_stats AS c
GROUP BY
date_trunc(‘day’,
ad.c.indate),
ad.c.ymd,
coalesce(ad.c.channelid, 0),
coalesce(ad.c.adsid, 0),
coalesce(ad.c.adid, 0),
coalesce(ad.c.keyid, 0),
coalesce(ad.c.materialid, 0);


请问这是什么原因?

垃圾去无踪,生活更轻松 - StarRocks 如何清理对象存储垃圾数据 - 知乎 (zhihu.com) 您可以参考下该文档


多谢您的解答,我使用的是阿里的oss,是看到这个bucket上使用了8.3t的空间,而实际的starrocks中看到业务表只占用了15g的空间,这个bucket上看的8.3t是starrocks中的配额?


这是一个新开的库,没有做过表删除操作
库的各个s3存储:

查询获取的库存储占用:
图片
而在oss中发现了个16686的table id占用了3.5t,这是一个物化视图查询uv,数据量总的也就几千万,物化视图在上方

您执行下 show proc ‘/dbs/10053’ 看看,有没有 table id 是 16686 的

这个16686找到了是我昨天删除的一个物化视图,这个物化视图:
CREATE MATERIALIZED VIEW t_ssp_uv
partition by log_time
REFRESH ASYNC
PROPERTIES(
“partition_ttl_number” = “365”,
“partition_refresh_number” = “2”
) as
SELECT
date_trunc(‘day’,
ad . c . indate ) AS log_time ,
ad . c . ymd ,
coalesce( ad . c . channelid , 0) AS channelid ,
coalesce( ad . c . adsid , 0) AS slot_id ,
coalesce( ad . c . adid , 0) AS ad_id ,
coalesce( ad . c . keyid , 0) AS key_id ,
coalesce( ad . c . materialid , 0) AS ma_id ,
bitmap_union_int( ad . c . deviceid ) AS uv ,
bitmap_union_int( ad . c . ip ) AS ip
FROM
ad . dw_ad_stats AS c
GROUP BY
date_trunc(‘day’,
ad . c . indate ),
ad . c . ymd ,
coalesce( ad . c . channelid , 0),
coalesce( ad . c . adsid , 0),
coalesce( ad . c . adid , 0),
coalesce( ad . c . keyid , 0),
coalesce( ad . c . materialid , 0);

数据量并不大,查询的这个 dw_ad_stats也是一个物化视图数据总量才6万多条
图片