diff --git a/SAS/ResourceAssignment/ResourceAssignmentDatabase/radb/sql/add_functions_and_triggers.sql b/SAS/ResourceAssignment/ResourceAssignmentDatabase/radb/sql/add_functions_and_triggers.sql index 7b2ace68871eb4a92fc4f7354005548598068e23..4c5ed086feaafad81b6403ab9dde893865a5482c 100644 --- a/SAS/ResourceAssignment/ResourceAssignmentDatabase/radb/sql/add_functions_and_triggers.sql +++ b/SAS/ResourceAssignment/ResourceAssignmentDatabase/radb/sql/add_functions_and_triggers.sql @@ -1041,8 +1041,11 @@ DECLARE claim_has_conflicts boolean; proc_start timestamp with time zone; proc_end timestamp with time zone; + part_start timestamp with time zone; + part_end timestamp with time zone; BEGIN SELECT * from clock_timestamp() into proc_start; + SELECT * from clock_timestamp() into part_start; -- in the before trigger function, everything on the claim has been checked and adapted. -- now (in the after trigger, when all claims were inserted/updated in the database), let's check if the task should also be updated (to conflict status for example) @@ -1064,6 +1067,10 @@ BEGIN END IF; END IF; + SELECT * from clock_timestamp() into part_end; + RAISE NOTICE 'after_claim_insertupdatedelete1 took %', part_end - part_start; + SELECT * from clock_timestamp() into part_start; + -- if this claim was moved or went from claimed to other status -- then check all other claims in conflict which might be affected by this change -- maybe they can be updated from conflict status to tentative... @@ -1086,6 +1093,10 @@ BEGIN END LOOP; END IF; + SELECT * from clock_timestamp() into part_end; + RAISE NOTICE 'after_claim_insertupdatedelete2 took %', part_end - part_start; + SELECT * from clock_timestamp() into part_start; + -- if this claim went from to claimed status -- then check all other claims in tentative state which might be affected by this change -- maybe they should be updated from tentative status to conflict... @@ -1107,6 +1118,10 @@ BEGIN END LOOP; END IF; + SELECT * from clock_timestamp() into part_end; + RAISE NOTICE 'after_claim_insertupdatedelete3 took %', part_end - part_start; + SELECT * from clock_timestamp() into part_start; + SELECT * from clock_timestamp() into proc_end; RAISE NOTICE 'after_claim_insertupdatedelete took %', proc_end - proc_start;