Is there a way to limit the resource usage of operations corresponding to a specific user/table?

Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.

Original topic: 有没有方法限制某个用户/库表 对应的操作资源使用?

| username: 海石花47

【TiDB Usage Environment】Production Environment
【TiDB Version】v6.1
【Encountered Problem: Problem Phenomenon and Impact】

Is there any way to limit the resource usage of certain objects?
For example, all operations of a specific user, all operations of a specific database, all operations of a specific table, certain specific SQL operations, etc.?

It seems that the official documentation does not support “user-level” resource limit settings.
The only solution I can think of is to actively set the memory limit threshold for individual SQL statements at the session level on the application side.

| username: xfworld | Original post link

There are no better solutions, most of them are soft limits, not the hard limits you expect.

| username: 海石花47 | Original post link

Are there any other soft limit methods?

| username: xfworld | Original post link

The maximum execution time for SQL, but this experience is not good. The memory limit for SQL is also a soft limit.

| username: 海石花47 | Original post link

I know the latter and have tested it. Could you please tell me which parameter the former is?

| username: xfworld | Original post link

Be careful of collateral damage…

| username: 海石花47 | Original post link

It does look a bit scary… indeed not very reliable.

| username: alfred | Original post link

There is indeed no user profile restriction similar to Oracle.

| username: system | Original post link

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.