Db Resource Management : grp1 vs grp2 (80% cpu vs 20% cpu)
I have created 2 consumers groups :
grp1 => 80% cpu associated to user_1
grp2 => 20 % cpu associated to user_2
i make 2 connections to myDB (user_1 & user_2) and i query the db with the same sql_id:
DECLARE
sqrtval NUMBER := 0;
BEGIN
FOR idx1 IN 1..2000
LOOP
FOR idx2 IN 1..1000
LOOP
SELECT (SQRT(idx2/idx1)) INTO sqrtval FROM DUAL;
END LOOP;
END LOOP;
END;
/
Remark : The 2 queries complete at teh same time
Question: The user_1 should have complete before the user_2 ? shouldn't he ?
Where can i see that user_1 has used 80% of cpu & user_2 only 20 % ?
thanks
Of course :
1) the plan is active (v$rsrc_plan).
2) user are set in their respective groups (exec DBMS_RESOURCE_MANAGER.SWITCH_CONSUMER_GROUP_FOR_USER).