This article is half-done without your Comment! *** Please share your thoughts via Comment ***
Create an RQ with Statement Limit:
It will allow an only specified number of active statement for particular RQ.
1 |
CREATE RESOURCE QUEUE MyRQ WITH (ACTIVE_STATEMENTS=5); |
Create an RQ with Memory Limit:
The Memory restriction all the queries which submitted through the RQ.
1 |
CREATE RESOURCE QUEUE MyRQ WITH (ACTIVE_STATEMENTS=5, MEMORY_LIMIT='3000MB'); |
Create an RQ with Query Execution Planner cost Limit:
You can set a limit of Query Execution Planner cost where some active statements are not required and N number of sessions can run until it reaches to MAX_COST.
1 |
CREATE RESOURCE QUEUE MyRQ WITH (MAX_COST=200000.0); |
Set Priorities:
You can set any priority level from this list: LOW, MEDIUM, HIGH, MAX
1 |
ALTER RESOURCE QUEUE MyRQ WITH (PRIORITY=MAX); |
Assign Roles to RQ:
Create:
1 |
CREATE ROLE MyRole WITH LOGIN RESOURCE QUEUE MyRQ; |
Alter:
1 |
ALTER ROLE MyRole RESOURCE QUEUE MyRQ; |
Remove Role from RQ:
1 |
ALTER ROLE MyRole RESOURCE QUEUE MyRQ; |
Leave a Reply