| Sort (cost=133.16..133.17 rows=4 width=184) |
| Sort Key: sub.id DESC |
| -> Subquery Scan on sub (cost=0.00..133.12 rows=4 width=184) |
| -> Append (cost=0.00..133.08 rows=4 width=124) |
| -> Subquery Scan on "*SELECT* 1" (cost=0.00..32.94 rows=1 width=124) |
| -> Nested Loop (cost=0.00..32.93 rows=1 width=120) |
| Join Filter: (r.erp_payment_ticket_id = t.id) |
| -> Seq Scan on tbl_erp_payment_tickets t (cost=0.00..12.25 rows=1 width=52) |
| Filter: (is_payment_settle AND (status = ANY ('{2,5}'::integer[]))) |
| -> Seq Scan on tbl_erp_payment_ticket_settles r (cost=0.00..20.50 rows=14 width=44) |
| Filter: (purchase_contract_id = ANY ('{4,3,2,1}'::integer[])) |
| -> Hash Join (cost=12.15..33.00 rows=1 width=124) |
| Hash Cond: (r_1.erp_other_income_ticket_id = t_1.id) |
| -> Seq Scan on tbl_erp_other_income_ticket_purchase_contract_settles r_1 (cost=0.00..20.80 rows=14 width=44) |
| Filter: (purchase_contract_id = ANY ('{4,3,2,1}'::integer[])) |
| -> Hash (cost=12.12..12.12 rows=2 width=48) |
| -> Seq Scan on tbl_erp_other_income_tickets t_1 (cost=0.00..12.12 rows=2 width=48) |
| Filter: (status = ANY ('{2,5}'::integer[])) |
| -> Nested Loop (cost=0.00..34.29 rows=1 width=124) |
| Join Filter: (r_2.erp_cash_cost_ticket_id = t_2.id) |
| -> Seq Scan on tbl_erp_cash_cost_tickets t_2 (cost=0.00..12.38 rows=1 width=48) |
| Filter: (is_payment_settle AND (status = ANY ('{2,5}'::integer[]))) |
| -> Seq Scan on tbl_erp_cash_cost_ticket_purchase_contract_settles r_2 (cost=0.00..21.70 rows=16 width=44) |
| Filter: (purchase_contract_id = ANY ('{4,3,2,1}'::integer[])) |
| -> Hash Join (cost=12.28..32.82 rows=1 width=124) |
| Hash Cond: (r_3.erp_collect_ticket_id = t_3.id) |
| -> Seq Scan on tbl_erp_collect_ticket_settles r_3 (cost=0.00..20.50 rows=14 width=44) |
| Filter: (purchase_contract_id = ANY ('{4,3,2,1}'::integer[])) |
| -> Hash (cost=12.25..12.25 rows=2 width=48) |
| -> Seq Scan on tbl_erp_collect_tickets t_3 (cost=0.00..12.25 rows=2 width=48) |
| Filter: (status = ANY ('{2,5}'::integer[])) |