Sort (cost=625.02..625.29 rows=106 width=168) |
Sort Key: "*SELECT* 1".id DESC |
-> Result (cost=82.95..621.46 rows=106 width=168) |
-> Append (cost=82.95..620.40 rows=106 width=112) |
-> Subquery Scan on "*SELECT* 1" (cost=82.95..150.50 rows=27 width=94) |
-> Hash Join (cost=82.95..150.23 rows=27 width=98) |
Hash Cond: (t.id = r.erp_collect_ticket_id) |
-> Seq Scan on tbl_erp_collect_tickets t (cost=0.00..59.35 rows=1989 width=48) |
Filter: (status = ANY ('{2,5,1}'::integer[])) |
-> Hash (cost=82.62..82.62 rows=27 width=18) |
-> Seq Scan on tbl_erp_collect_ticket_settles r (cost=0.00..82.62 rows=27 width=18) |
Filter: ((sales_contract_id IS NOT NULL) AND (sales_contract_id = ANY ('{4082,4075,4055,3997,3978,3967,3935,3916,3900,3857,3803,3763,3755,3746,3725,3724,3703,3661,3620,3525}'::integer[]))) |
-> Subquery Scan on "*SELECT* 2" (cost=38.28..375.25 rows=78 width=118) |
-> Hash Join (cost=38.28..374.47 rows=78 width=122) |
Hash Cond: (t_1.id = r_1.erp_cash_cost_ticket_id) |
-> Seq Scan on tbl_erp_cash_cost_tickets t_1 (cost=0.00..243.49 rows=7308 width=46) |
Filter: (status = ANY ('{2,5,1}'::integer[])) |
-> Hash (cost=37.30..37.30 rows=78 width=44) |
-> Seq Scan on tbl_erp_cash_cost_ticket_sales_contract_settles r_1 (cost=0.00..37.30 rows=78 width=44) |
Filter: ((sales_contract_id IS NOT NULL) AND (sales_contract_id = ANY ('{4082,4075,4055,3997,3978,3967,3935,3916,3900,3857,3803,3763,3755,3746,3725,3724,3703,3661,3620,3525}'::integer[]))) |
-> Subquery Scan on "*SELECT* 3" (cost=0.28..94.64 rows=1 width=89) |
-> Nested Loop (cost=0.28..94.63 rows=1 width=93) |
-> Seq Scan on tbl_erp_payment_ticket_settles r_2 (cost=0.00..86.31 rows=1 width=18) |
Filter: ((sales_contract_id IS NOT NULL) AND (sales_contract_id = ANY ('{4082,4075,4055,3997,3978,3967,3935,3916,3900,3857,3803,3763,3755,3746,3725,3724,3703,3661,3620,3525}'::integer[]))) |
-> Index Scan using tbl_erp_payment_tickets_pkey on tbl_erp_payment_tickets t_2 (cost=0.28..8.30 rows=1 width=17) |
Index Cond: (id = r_2.erp_payment_ticket_id) |
Filter: (status = ANY ('{2,5,1}'::integer[])) |