Skip to content
Snippets Groups Projects
Commit afc03c39 authored by Jorrit Schaap's avatar Jorrit Schaap
Browse files

SW-41: measure and log some more sql procedure parts to see where the time is spend.

parent e0bf0fe5
No related branches found
No related tags found
No related merge requests found
......@@ -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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment