"Sort (cost=171.31..171.31 rows=1 width=2002)" " Sort Key: res.id_" " -> Nested Loop Left Join (cost=151.59..171.30 rows=1 width=2002)" " Join Filter: ((self.proc_def_key_)::text = (act.proc_def_key_)::text)" " Filter: (((act.proc_def_key_ IS NOT NULL) AND (self.proc_def_key_ IS NOT NULL)) OR (act.proc_def_key_ IS NULL))" " -> Nested Loop (cost=0.41..20.09 rows=1 width=2518)" " -> Nested Loop (cost=0.27..16.32 rows=1 width=1486)" " -> Index Scan using act_idx_hi_act_inst_procinst on act_hi_actinst act (cost=0.14..8.15 rows=1 width=1324)" " Index Cond: ((proc_inst_id_)::text = 'e53614ec-eea5-11e6-bc24-28d24461aeb0'::text)" " -> Index Scan using act_hi_procinst_pkey on act_hi_procinst res (cost=0.14..8.15 rows=1 width=308)" " Index Cond: ((id_)::text = (act.call_proc_inst_id_)::text)" " -> Index Scan using act_re_procdef_pkey on act_re_procdef proc_ (cost=0.14..3.76 rows=1 width=1178)" " Index Cond: ((id_)::text = (res.proc_def_id_)::text)" " -> HashAggregate (cost=151.18..151.19 rows=1 width=516)" " Group Key: self.proc_def_key_" " -> Seq Scan on act_hi_procinst self (cost=0.00..151.17 rows=1 width=516)" " Filter: ((SubPlan 9) = 1)" " SubPlan 9" " -> Result (cost=14.09..14.10 rows=1 width=0)" " InitPlan 2 (returns $2)" " -> Seq Scan on act_ru_authorization a_1 (cost=0.00..2.30 rows=1 width=0)" " Filter: ((type_ = 1) AND ((user_id_)::text = 'demo'::text) AND (resource_type_ = 6) AND ((resource_id_)::text = '*'::text) AND ((perms_ & 4096) = 4096))" " InitPlan 8 (returns $8)" " -> Result (cost=9.48..9.49 rows=1 width=0)" " InitPlan 4 (returns $4)" " -> Seq Scan on act_ru_authorization a_3 (cost=0.00..2.43 rows=1 width=0)" " Filter: ((type_ = 1) AND (resource_type_ = 6) AND ((resource_id_)::text = '*'::text) AND ((group_id_)::text = ANY ('{camunda-admin,sales,accounting,management}'::text[])) AND ((perms_ & 4096) = 4096))" " InitPlan 7 (returns $7)" " -> Result (cost=4.60..4.61 rows=1 width=0)" " InitPlan 6 (returns $6)" " -> Seq Scan on act_ru_authorization a_5 (cost=0.00..2.30 rows=1 width=0)" " Filter: ((type_ = 0) AND ((user_id_)::text = '*'::text) AND ((resource_id_)::text = '*'::text) AND (resource_type_ = 6) AND ((perms_ & 4096) = 4096))" " SubPlan 5" " -> Seq Scan on act_ru_authorization a_4 (cost=0.00..2.30 rows=1 width=14)" " Filter: ((type_ = 0) AND ((user_id_)::text = '*'::text) AND (resource_type_ = 6) AND ((resource_id_)::text = (self.proc_def_key_)::text) AND ((perms_ & 4096) = 4096))" " SubPlan 3" " -> Seq Scan on act_ru_authorization a_2 (cost=0.00..2.43 rows=1 width=14)" " Filter: ((type_ = 1) AND (resource_type_ = 6) AND ((resource_id_)::text = (self.proc_def_key_)::text) AND ((group_id_)::text = ANY ('{camunda-admin,sales,accounting,management}'::text[])) AND ((perms_ & 4096) = 4 (...)" " SubPlan 1" " -> Seq Scan on act_ru_authorization a (cost=0.00..2.30 rows=1 width=14)" " Filter: ((type_ = 1) AND ((user_id_)::text = 'demo'::text) AND (resource_type_ = 6) AND ((resource_id_)::text = (self.proc_def_key_)::text) AND ((perms_ & 4096) = 4096))"