QUERY PLAN
Sort (cost=4.62..4.63 rows=1 width=214)
Sort Key: t.settle_at
-> Append (cost=0.00..4.62 rows=1 width=214)
-> Nested Loop (cost=0.00..4.61 rows=1 width=214)
-> Seq Scan on tbl_erp_other_income_tickets r (cost=0.00..3.20 rows=1 width=123)
Filter: ((status = ANY ('{2,6}'::integer[])) AND (id = 42))
-> Seq Scan on tbl_erp_other_income_ticket_bank_ins t (cost=0.00..1.39 rows=1 width=22)
Filter: ((id IS NOT NULL) AND (erp_other_income_ticket_id = 42))