explain.depesz.com

PostgreSQL's explain analyze made readable

Result: zEJB

Settings
# exclusive inclusive rows x rows loops node
1. 0.139 1,366.714 ↑ 533.6 77 1

Limit (cost=13,472,577.68..13,484,147.68 rows=41,088 width=2,535) (actual time=1,366.251..1,366.714 rows=77 loops=1)

  • Output: shumantask0_.tenantid, shumantask0_.id, shumantask0_.flownodedefinitionid, shumantask0_.kind, shumantask0_.rootcontainerid, shumantask0_.parentcontainerid, shumantask0_.name, shumantask0_.displayname, shumantask0_.displaydescription, shumantask0_.stateid, shumantask0_.statename, shumantask0_.prev_state_id, shumantask0_.terminal, shumantask0_.stable, shumantask0_.actorid, shumantask0_.assigneeid, shumantask0_.reachedstatedate, shumantask0_.lastupdatedate, shumantask0_.expectedenddate, shumantask0_.claimeddate, shumantask0_.priority, shumantask0_.gatewaytype, shumantask0_.hitbys, shumantask0_.statecategory, shumantask0_.logicalgroup1, shumantask0_.logicalgroup2, shumantask0_.logicalgroup3, shumantask0_.logicalgroup4, shumantask0_.loop_counter, shumantask0_.loop_max, shumantask0_.description, shumantask0_.sequential, shumantask0_.loopdatainputref, shumantask0_.loopdataoutputref, shumantask0_.datainputitemref, shumantask0_.dataoutputitemref, shumantask0_.loopcardinality, shumantask0_.nbactiveinst, shumantask0_.nbcompletedinst, shumantask0_.nbterminatedinst, shumantask0_.executedby, shumantask0_.executedbysubstitute, shumantask0_.activityinstanceid, shumantask0_.state_executing, shumantask0_.abortedbyboundary, shumantask0_.triggeredbyevent, shumantask0_.interrupting, shumantask0_.tokencount
  • Buffers: shared hit=55737
2. 0.262 1,366.575 ↑ 533.6 77 1

Unique (cost=13,472,577.68..13,484,147.68 rows=41,088 width=2,535) (actual time=1,366.246..1,366.575 rows=77 loops=1)

  • Output: shumantask0_.tenantid, shumantask0_.id, shumantask0_.flownodedefinitionid, shumantask0_.kind, shumantask0_.rootcontainerid, shumantask0_.parentcontainerid, shumantask0_.name, shumantask0_.displayname, shumantask0_.displaydescription, shumantask0_.stateid, shumantask0_.statename, shumantask0_.prev_state_id, shumantask0_.terminal, shumantask0_.stable, shumantask0_.actorid, shumantask0_.assigneeid, shumantask0_.reachedstatedate, shumantask0_.lastupdatedate, shumantask0_.expectedenddate, shumantask0_.claimeddate, shumantask0_.priority, shumantask0_.gatewaytype, shumantask0_.hitbys, shumantask0_.statecategory, shumantask0_.logicalgroup1, shumantask0_.logicalgroup2, shumantask0_.logicalgroup3, shumantask0_.logicalgroup4, shumantask0_.loop_counter, shumantask0_.loop_max, shumantask0_.description, shumantask0_.sequential, shumantask0_.loopdatainputref, shumantask0_.loopdataoutputref, shumantask0_.datainputitemref, shumantask0_.dataoutputitemref, shumantask0_.loopcardinality, shumantask0_.nbactiveinst, shumantask0_.nbcompletedinst, shumantask0_.nbterminatedinst, shumantask0_.executedby, shumantask0_.executedbysubstitute, shumantask0_.activityinstanceid, shumantask0_.state_executing, shumantask0_.abortedbyboundary, shumantask0_.triggeredbyevent, shumantask0_.interrupting, shumantask0_.tokencount
  • Buffers: shared hit=55737
3. 0.734 1,366.313 ↑ 1,195.6 79 1

Sort (cost=13,472,577.68..13,472,813.80 rows=94,449 width=2,535) (actual time=1,366.242..1,366.313 rows=79 loops=1)

  • Output: shumantask0_.tenantid, shumantask0_.id, shumantask0_.flownodedefinitionid, shumantask0_.kind, shumantask0_.rootcontainerid, shumantask0_.parentcontainerid, shumantask0_.name, shumantask0_.displayname, shumantask0_.displaydescription, shumantask0_.stateid, shumantask0_.statename, shumantask0_.prev_state_id, shumantask0_.terminal, shumantask0_.stable, shumantask0_.actorid, shumantask0_.assigneeid, shumantask0_.reachedstatedate, shumantask0_.lastupdatedate, shumantask0_.expectedenddate, shumantask0_.claimeddate, shumantask0_.priority, shumantask0_.gatewaytype, shumantask0_.hitbys, shumantask0_.statecategory, shumantask0_.logicalgroup1, shumantask0_.logicalgroup2, shumantask0_.logicalgroup3, shumantask0_.logicalgroup4, shumantask0_.loop_counter, shumantask0_.loop_max, shumantask0_.description, shumantask0_.sequential, shumantask0_.loopdatainputref, shumantask0_.loopdataoutputref, shumantask0_.datainputitemref, shumantask0_.dataoutputitemref, shumantask0_.loopcardinality, shumantask0_.nbactiveinst, shumantask0_.nbcompletedinst, shumantask0_.nbterminatedinst, shumantask0_.executedby, shumantask0_.executedbysubstitute, shumantask0_.activityinstanceid, shumantask0_.state_executing, shumantask0_.abortedbyboundary, shumantask0_.triggeredbyevent, shumantask0_.interrupting, shumantask0_.tokencount
  • Sort Key: shumantask0_.id, shumantask0_.flownodedefinitionid, shumantask0_.kind, shumantask0_.rootcontainerid, shumantask0_.parentcontainerid, shumantask0_.name, shumantask0_.displayname, shumantask0_.displaydescription, shumantask0_.stateid, shumantask0_.statename, shumantask0_.prev_state_id, shumantask0_.terminal, shumantask0_.stable, shumantask0_.actorid, shumantask0_.assigneeid, shumantask0_.reachedstatedate, shumantask0_.lastupdatedate, shumantask0_.expectedenddate, shumantask0_.claimeddate, shumantask0_.priority, shumantask0_.gatewaytype, shumantask0_.hitbys, shumantask0_.statecategory, shumantask0_.logicalgroup1, shumantask0_.logicalgroup2, shumantask0_.logicalgroup3, shumantask0_.logicalgroup4, shumantask0_.loop_counter, shumantask0_.loop_max, shumantask0_.description, shumantask0_.sequential, shumantask0_.loopdatainputref, shumantask0_.loopdataoutputref, shumantask0_.datainputitemref, shumantask0_.dataoutputitemref, shumantask0_.loopcardinality, shumantask0_.nbactiveinst, shumantask0_.nbcompletedinst, shumantask0_.nbterminatedinst, shumantask0_.executedby, shumantask0_.executedbysubstitute, shumantask0_.activityinstanceid, shumantask0_.state_executing, shumantask0_.abortedbyboundary, shumantask0_.triggeredbyevent, shumantask0_.interrupting, shumantask0_.tokencount
  • Sort Method: quicksort Memory: 65kB
  • Buffers: shared hit=55737
4. 387.229 1,365.579 ↑ 1,195.6 79 1

Nested Loop (cost=0.00..13,154,854.77 rows=94,449 width=2,535) (actual time=16.586..1,365.579 rows=79 loops=1)

  • Output: shumantask0_.tenantid, shumantask0_.id, shumantask0_.flownodedefinitionid, shumantask0_.kind, shumantask0_.rootcontainerid, shumantask0_.parentcontainerid, shumantask0_.name, shumantask0_.displayname, shumantask0_.displaydescription, shumantask0_.stateid, shumantask0_.statename, shumantask0_.prev_state_id, shumantask0_.terminal, shumantask0_.stable, shumantask0_.actorid, shumantask0_.assigneeid, shumantask0_.reachedstatedate, shumantask0_.lastupdatedate, shumantask0_.expectedenddate, shumantask0_.claimeddate, shumantask0_.priority, shumantask0_.gatewaytype, shumantask0_.hitbys, shumantask0_.statecategory, shumantask0_.logicalgroup1, shumantask0_.logicalgroup2, shumantask0_.logicalgroup3, shumantask0_.logicalgroup4, shumantask0_.loop_counter, shumantask0_.loop_max, shumantask0_.description, shumantask0_.sequential, shumantask0_.loopdatainputref, shumantask0_.loopdataoutputref, shumantask0_.datainputitemref, shumantask0_.dataoutputitemref, shumantask0_.loopcardinality, shumantask0_.nbactiveinst, shumantask0_.nbcompletedinst, shumantask0_.nbterminatedinst, shumantask0_.executedby, shumantask0_.executedbysubstitute, shumantask0_.activityinstanceid, shumantask0_.state_executing, shumantask0_.abortedbyboundary, shumantask0_.triggeredbyevent, shumantask0_.interrupting, shumantask0_.tokencount
  • Join Filter: ((shumantask0_.assigneeid = suserimpl2_.id) OR ((shumantask0_.assigneeid = 0) AND (SubPlan 5)))
  • Rows Removed by Join Filter: 331098
  • Buffers: shared hit=55718
5. 48.493 162.293 ↓ 1.1 77 1

Nested Loop (cost=0.00..14,492.19 rows=67 width=2,535) (actual time=2.123..162.293 rows=77 loops=1)

  • Output: shumantask0_.tenantid, shumantask0_.id, shumantask0_.flownodedefinitionid, shumantask0_.kind, shumantask0_.rootcontainerid, shumantask0_.parentcontainerid, shumantask0_.name, shumantask0_.displayname, shumantask0_.displaydescription, shumantask0_.stateid, shumantask0_.statename, shumantask0_.prev_state_id, shumantask0_.terminal, shumantask0_.stable, shumantask0_.actorid, shumantask0_.assigneeid, shumantask0_.reachedstatedate, shumantask0_.lastupdatedate, shumantask0_.expectedenddate, shumantask0_.claimeddate, shumantask0_.priority, shumantask0_.gatewaytype, shumantask0_.hitbys, shumantask0_.statecategory, shumantask0_.logicalgroup1, shumantask0_.logicalgroup2, shumantask0_.logicalgroup3, shumantask0_.logicalgroup4, shumantask0_.loop_counter, shumantask0_.loop_max, shumantask0_.description, shumantask0_.sequential, shumantask0_.loopdatainputref, shumantask0_.loopdataoutputref, shumantask0_.datainputitemref, shumantask0_.dataoutputitemref, shumantask0_.loopcardinality, shumantask0_.nbactiveinst, shumantask0_.nbcompletedinst, shumantask0_.nbterminatedinst, shumantask0_.executedby, shumantask0_.executedbysubstitute, shumantask0_.activityinstanceid, shumantask0_.state_executing, shumantask0_.abortedbyboundary, shumantask0_.triggeredbyevent, shumantask0_.interrupting, shumantask0_.tokencount
  • Join Filter: (shumantask0_.logicalgroup2 = sprocessin1_.id)
  • Rows Removed by Join Filter: 49511
  • Buffers: shared hit=12587
6. 0.610 0.610 ↑ 1.0 77 1

Seq Scan on public.process_instance sprocessin1_ (cost=0.00..46.99 rows=77 width=8) (actual time=0.012..0.610 rows=77 loops=1)

  • Output: sprocessin1_.tenantid, sprocessin1_.id, sprocessin1_.name, sprocessin1_.processdefinitionid, sprocessin1_.description, sprocessin1_.startdate, sprocessin1_.startedby, sprocessin1_.startedbysubstitute, sprocessin1_.enddate, sprocessin1_.stateid, sprocessin1_.statecategory, sprocessin1_.lastupdate, sprocessin1_.containerid, sprocessin1_.rootprocessinstanceid, sprocessin1_.callerid, sprocessin1_.callertype, sprocessin1_.interruptingeventid, sprocessin1_.stringindex1, sprocessin1_.stringindex2, sprocessin1_.stringindex3, sprocessin1_.stringindex4, sprocessin1_.stringindex5
  • Filter: ((sprocessin1_.tenantid = 1) AND (sprocessin1_.processdefinitionid = 6961645213163614648::bigint))
  • Rows Removed by Filter: 665
  • Buffers: shared hit=36
7. 113.190 113.190 ↓ 1.0 644 77

Seq Scan on public.flownode_instance shumantask0_ (cost=0.00..179.57 rows=642 width=2,535) (actual time=0.004..1.470 rows=644 loops=77)

  • Output: shumantask0_.tenantid, shumantask0_.id, shumantask0_.flownodedefinitionid, shumantask0_.kind, shumantask0_.rootcontainerid, shumantask0_.parentcontainerid, shumantask0_.name, shumantask0_.displayname, shumantask0_.displaydescription, shumantask0_.stateid, shumantask0_.statename, shumantask0_.prev_state_id, shumantask0_.terminal, shumantask0_.stable, shumantask0_.actorid, shumantask0_.assigneeid, shumantask0_.reachedstatedate, shumantask0_.lastupdatedate, shumantask0_.expectedenddate, shumantask0_.claimeddate, shumantask0_.priority, shumantask0_.gatewaytype, shumantask0_.hitbys, shumantask0_.statecategory, shumantask0_.logicalgroup1, shumantask0_.logicalgroup2, shumantask0_.logicalgroup3, shumantask0_.logicalgroup4, shumantask0_.loop_counter, shumantask0_.loop_max, shumantask0_.description, shumantask0_.sequential, shumantask0_.loopdatainputref, shumantask0_.loopdataoutputref, shumantask0_.datainputitemref, shumantask0_.dataoutputitemref, shumantask0_.loopcardinality, shumantask0_.nbactiveinst, shumantask0_.nbcompletedinst, shumantask0_.nbterminatedinst, shumantask0_.executedby, shumantask0_.executedbysubstitute, shumantask0_.activityinstanceid, shumantask0_.state_executing, shumantask0_.abortedbyboundary, shumantask0_.triggeredbyevent, shumantask0_.interrupting, shumantask0_.tokencount
  • Filter: (shumantask0_.stable AND (NOT shumantask0_.state_executing) AND (NOT shumantask0_.terminal) AND ((shumantask0_.kind)::text = ANY ('{user,manual}'::text[])) AND (shumantask0_.tenantid = 1))
  • Rows Removed by Filter: 470
  • Buffers: shared hit=12551
8. 302.498 308.539 ↑ 1.0 4,301 77

Materialize (cost=0.00..198.27 rows=4,301 width=8) (actual time=0.002..4.007 rows=4,301 loops=77)

  • Output: suserimpl2_.id
  • Buffers: shared hit=123
9. 6.041 6.041 ↑ 1.0 4,301 1

Seq Scan on public.user_ suserimpl2_ (cost=0.00..176.76 rows=4,301 width=8) (actual time=0.021..6.041 rows=4,301 loops=1)

  • Output: suserimpl2_.id
  • Filter: (suserimpl2_.tenantid = 1)
  • Buffers: shared hit=123
10.          

SubPlan (forNested Loop)

11. 94.766 507.518 ↓ 0.0 0 8,602

Index Only Scan using idx_uq_pending_mapping on public.pending_mapping spendingac3_ (cost=0.28..136.19 rows=3 width=0) (actual time=0.059..0.059 rows=0 loops=8,602)

  • Index Cond: ((spendingac3_.tenantid = 1) AND (spendingac3_.activityid = shumantask0_.id))
  • Filter: ((spendingac3_.userid = suserimpl2_.id) OR (alternatives: SubPlan 2 or hashed SubPlan 4))
  • Rows Removed by Filter: 2
  • Heap Fetches: 17202
  • Buffers: shared hit=43008
12.          

SubPlan (forIndex Only Scan)

13. 103.188 412.752 ↓ 0.0 0 17,198

Nested Loop (cost=0.14..20.42 rows=1 width=0) (actual time=0.024..0.024 rows=0 loops=17,198)

  • Buffers: shared hit=17198
14. 309.564 309.564 ↓ 0.0 0 17,198

Seq Scan on public.actor sactorimpl4_ (cost=0.00..2.14 rows=1 width=8) (actual time=0.018..0.018 rows=0 loops=17,198)

  • Output: sactorimpl4_.tenantid, sactorimpl4_.id, sactorimpl4_.scopeid, sactorimpl4_.name, sactorimpl4_.displayname, sactorimpl4_.description, sactorimpl4_.initiator
  • Filter: ((sactorimpl4_.tenantid = 1) AND (sactorimpl4_.id = spendingac3_.actorid))
  • Rows Removed by Filter: 76
  • Buffers: shared hit=17198
15. 0.000 0.000 ↓ 0.0 0

Index Only Scan using actormember_tenantid_actorid_userid_groupid_roleid_key on public.actormember sactormemb5_ (cost=0.14..18.27 rows=1 width=8) (never executed)

  • Output: sactormemb5_.tenantid, sactormemb5_.actorid, sactormemb5_.userid, sactormemb5_.groupid, sactormemb5_.roleid
  • Index Cond: ((sactormemb5_.tenantid = 1) AND (sactormemb5_.actorid = spendingac3_.actorid))
  • Filter: ((sactormemb5_.userid = suserimpl2_.id) OR (SubPlan 1))
  • Heap Fetches: 0
16.          

SubPlan (forIndex Only Scan)

17. 0.000 0.000 ↓ 0.0 0

Index Only Scan using user_membership_tenantid_userid_roleid_groupid_key on public.user_membership susermembe6_ (cost=0.29..10.11 rows=1 width=0) (never executed)

  • Index Cond: ((susermembe6_.tenantid = 1) AND (susermembe6_.userid = suserimpl2_.id))
  • Filter: (((sactormemb5_.groupid = susermembe6_.groupid) AND (sactormemb5_.roleid <= 0)) OR ((sactormemb5_.roleid = susermembe6_.roleid) AND (sactormemb5_.groupid <= 0)) OR ((sactormemb5_.groupid = susermembe6_.groupid) AND (sactormemb5_.roleid = susermembe6_.roleid)))
  • Heap Fetches: 0
18. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=0.14..795.42 rows=57 width=8) (never executed)

  • Output: sactorimpl4__1.id
19. 0.000 0.000 ↓ 0.0 0

Seq Scan on public.actor sactorimpl4__1 (cost=0.00..1.95 rows=76 width=8) (never executed)

  • Output: sactorimpl4__1.tenantid, sactorimpl4__1.id, sactorimpl4__1.scopeid, sactorimpl4__1.name, sactorimpl4__1.displayname, sactorimpl4__1.description, sactorimpl4__1.initiator
  • Filter: (sactorimpl4__1.tenantid = 1)
20. 0.000 0.000 ↓ 0.0 0

Index Only Scan using actormember_tenantid_actorid_userid_groupid_roleid_key on public.actormember sactormemb5__1 (cost=0.14..10.43 rows=1 width=8) (never executed)

  • Output: sactormemb5__1.tenantid, sactormemb5__1.actorid, sactormemb5__1.userid, sactormemb5__1.groupid, sactormemb5__1.roleid
  • Index Cond: ((sactormemb5__1.tenantid = 1) AND (sactormemb5__1.actorid = sactorimpl4__1.id))
  • Filter: ((sactormemb5__1.userid = suserimpl2_.id) OR (SubPlan 3))
  • Heap Fetches: 0
21.          

SubPlan (forIndex Only Scan)

22. 0.000 0.000 ↓ 0.0 0

Index Only Scan using user_membership_tenantid_userid_roleid_groupid_key on public.user_membership susermembe6__1 (cost=0.29..10.11 rows=1 width=0) (never executed)

  • Index Cond: ((susermembe6__1.tenantid = 1) AND (susermembe6__1.userid = suserimpl2_.id))
  • Filter: (((sactormemb5__1.groupid = susermembe6__1.groupid) AND (sactormemb5__1.roleid <= 0)) OR ((sactormemb5__1.roleid = susermembe6__1.roleid) AND (sactormemb5__1.groupid <= 0)) OR ((sactormemb5__1.groupid = susermembe6__1.groupid) AND (sactormemb5__1.roleid = susermembe6__1.roleid)))
  • Heap Fetches: 0