QUERY PLAN
Result (cost=516.48..516.49 rows=1 width=1)
InitPlan 1 (returns $0)
-> Nested Loop Left Join (cost=0.28..516.48 rows=1 width=0)
Join Filter: (rccr.reimbursement_id = r.id)
Filter: ((r.created_by = ANY ('{5360,5311,1011,1011}'::integer[])) OR (rccr.user_id = 1011) OR (rsr.user_id = 1011) OR (rvr.user_id = 1011))
-> Nested Loop Left Join (cost=0.28..508.36 rows=1 width=16)
Join Filter: (rsr.reimbursement_id = r.id)
-> Nested Loop Left Join (cost=0.28..371.30 rows=1 width=12)
Join Filter: (rvr.reimbursement_id = r.id)
-> Index Scan using tbl_reimbursements_pkey on tbl_reimbursements r (cost=0.28..8.30 rows=1 width=8)
Index Cond: (id = 7912)
-> Seq Scan on tbl_reimbursement_verify_rels rvr (cost=0.00..362.96 rows=3 width=8)
Filter: (reimbursement_id = 7912)
-> Seq Scan on tbl_reimbursement_settle_rels rsr (cost=0.00..137.05 rows=1 width=8)
Filter: (reimbursement_id = 7912)
-> Seq Scan on tbl_reimbursement_carbon_copy_rels rccr (cost=0.00..8.09 rows=1 width=8)
Filter: (reimbursement_id = 7912)