CREATE RESOURCE GROUP IF NOT EXISTS ap_l RU_PER_SEC = 25000 PRIORITY = LOW;
create user u1@‘xxx.%’ identified by ‘xxxx’;
ALTER USER u1@‘xxx.%’ RESOURCE GROUP ap_l;
跑 SQL 是切换到 u1 用户下,SQL 如下:
SELECT
xxx,xxx
FROM
t1
WHERE
xx = 123
AND xx >= “2024-07-22”
AND xx <= “2024-09-22”
GROUP BY
id
ORDER BY
xxx DESC
LIMIT
20000