Sort (cost=508.30..508.47 rows=65 width=158) |
Sort Key: "*SELECT* 1".id DESC |
-> Result (cost=58.72..506.35 rows=65 width=158) |
-> Append (cost=58.72..505.70 rows=65 width=104) |
-> Subquery Scan on "*SELECT* 1" (cost=58.72..127.72 rows=25 width=83) |
-> Hash Join (cost=58.72..127.47 rows=25 width=87) |
Hash Cond: (t.id = r.erp_collect_ticket_id) |
-> Seq Scan on tbl_erp_collect_tickets t (cost=0.00..60.76 rows=2015 width=37) |
Filter: (status = ANY ('{2,5,1}'::integer[])) |
-> Hash (cost=58.41..58.41 rows=25 width=18) |
-> Seq Scan on tbl_erp_collect_ticket_settles r (cost=0.00..58.41 rows=25 width=18) |
Filter: ((sales_contract_id IS NOT NULL) AND (sales_contract_id = ANY ('{4132,1044,1414,2286,2447,1866,3493,1541,765,229}'::integer[]))) |
-> Subquery Scan on "*SELECT* 2" (cost=0.28..308.08 rows=39 width=118) |
-> Nested Loop (cost=0.28..307.69 rows=39 width=122) |
-> Seq Scan on tbl_erp_cash_cost_ticket_sales_contract_settles r_1 (cost=0.00..27.55 rows=39 width=44) |
Filter: ((sales_contract_id IS NOT NULL) AND (sales_contract_id = ANY ('{4132,1044,1414,2286,2447,1866,3493,1541,765,229}'::integer[]))) |
-> Index Scan using tbl_erp_cash_cost_tickets_pkey on tbl_erp_cash_cost_tickets t_1 (cost=0.28..7.18 rows=1 width=46) |
Index Cond: (id = r_1.erp_cash_cost_ticket_id) |
Filter: (status = ANY ('{2,5,1}'::integer[])) |
-> Subquery Scan on "*SELECT* 3" (cost=0.28..69.89 rows=1 width=109) |
-> Nested Loop (cost=0.28..69.88 rows=1 width=113) |
-> Seq Scan on tbl_erp_payment_ticket_settles r_2 (cost=0.00..61.56 rows=1 width=18) |
Filter: ((sales_contract_id IS NOT NULL) AND (sales_contract_id = ANY ('{4132,1044,1414,2286,2447,1866,3493,1541,765,229}'::integer[]))) |
-> Index Scan using tbl_erp_payment_tickets_pkey on tbl_erp_payment_tickets t_2 (cost=0.28..8.30 rows=1 width=37) |
Index Cond: (id = r_2.erp_payment_ticket_id) |
Filter: (status = ANY ('{2,5,1}'::integer[])) |