为了更快的定位您的问题,请提供以下信息,谢谢
【StarRocks版本】2.5
【附件】
select
taskId,
sourceId,
columns,
CURDATE() as dt
from
(
select
‘test1’ as taskId,
‘doris’ as sourceId,
concat_ws (
“!#!”,
ifnull (substring(联盟名称
, 1, 32767), ‘’),
ifnull (substring(用户数(账号)
, 1, 32767), ‘’)
) as columns
from
(
SELECT
IFNULL (result.alliance_name
, ‘-’) AS 联盟名称
,
IFNULL (COUNT(DISTINCT result.#user_id
), 0) AS 用户数(账号)
FROM
(
SELECT
user.*
FROM
(
SELECT
#user_id
,
#user_id
AS analysis_id,
alliance_name
FROM
bdc_df.profile_100023_user_realtime
) user
) result
GROUP BY
1
ORDER BY
2 DESC
) old
) tmp
limit 1000000
不使用limit 1000000,查询时间不到1s,使用后查询超时,总条数6000+
加limit1000000后 15min没有执行处结果