Sort (cost=507.09..507.22 rows=51 width=168) |
Sort Key: "*SELECT* 1".id DESC |
-> Result (cost=58.54..505.65 rows=51 width=168) |
-> Append (cost=58.54..505.14 rows=51 width=110) |
-> Subquery Scan on "*SELECT* 1" (cost=58.54..127.16 rows=11 width=83) |
-> Hash Join (cost=58.54..127.05 rows=11 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=11 width=18) |
-> Seq Scan on tbl_erp_collect_ticket_settles r (cost=0.00..58.41 rows=11 width=18) |
Filter: ((sales_contract_id IS NOT NULL) AND (sales_contract_id = ANY ('{4112,4131,4106,4055,3997,3978,3967,3935,3916,3900}'::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 ('{4112,4131,4106,4055,3997,3978,3967,3935,3916,3900}'::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 ('{4112,4131,4106,4055,3997,3978,3967,3935,3916,3900}'::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[])) |