QUERY PLAN
Result (cost=66.16..66.17 rows=1 width=1)
InitPlan 1 (returns $0)
-> Nested Loop Left Join (cost=0.14..66.16 rows=1 width=0)
Join Filter: (rvr.erp_cash_cost_ticket_id = r.id)
Filter: ((r.created_by = ANY ('{1000,1001,1004,1005,1011,1013,1015,1017,1022,1023,5016,5064,5085,5087,5248,5250,5252,5295,5300,5311,5332,5360,5388,5446,5449}'::integer[])) OR (rccr.user_id = 1001) OR (rvr.user_id = 1001))
-> Nested Loop Left Join (cost=0.14..43.79 rows=1 width=12)
Join Filter: (rccr.erp_cash_cost_ticket_id = r.id)
-> Index Scan using tbl_erp_cash_cost_tickets_pkey on tbl_erp_cash_cost_tickets r (cost=0.14..8.16 rows=1 width=8)
Index Cond: (id = 8)
-> Seq Scan on tbl_erp_cash_cost_ticket_carbon_copy_rels rccr (cost=0.00..35.50 rows=10 width=8)
Filter: (erp_cash_cost_ticket_id = 8)
-> Seq Scan on tbl_erp_cash_cost_ticket_verify_rels rvr (cost=0.00..22.12 rows=5 width=8)
Filter: (erp_cash_cost_ticket_id = 8)