QUERY PLAN
Limit (cost=3873.79..3873.89 rows=40 width=171)
-> Sort (cost=3873.79..3919.63 rows=18335 width=171)
Sort Key: sub.verify_at DESC NULLS LAST, sub.created_at DESC
-> Append (cost=27.51..3294.23 rows=18335 width=171)
-> Subquery Scan on sub (cost=27.51..36.39 rows=209 width=166)
-> HashAggregate (cost=27.51..34.30 rows=209 width=174)
Group Key: r.id, rvr.status, rsvr.status
-> Hash Left Join (cost=12.31..25.94 rows=209 width=91)
Hash Cond: (r.id = rsvr.erp_purchase_inbound_id)
-> Hash Right Join (cost=11.26..24.10 rows=209 width=87)
Hash Cond: (rvr.erp_purchase_inbound_id = r.id)
-> Seq Scan on tbl_erp_purchase_inbound_verify_rels rvr (cost=0.00..12.31 rows=195 width=8)
Filter: (user_id = 1001)
-> Hash (cost=8.65..8.65 rows=209 width=83)
-> Seq Scan on tbl_erp_purchase_inbounds r (cost=0.00..8.65 rows=209 width=83)
Filter: (status <> 0)
-> Hash (cost=1.04..1.04 rows=1 width=8)
-> Seq Scan on tbl_erp_purchase_inbound_stop_verify_rels rsvr (cost=0.00..1.04 rows=1 width=8)
Filter: (user_id = 1001)
-> Subquery Scan on "*SELECT* 2" (cost=163.16..273.76 rows=2212 width=197)
-> HashAggregate (cost=163.16..251.64 rows=2212 width=209)
Group Key: r_1.id, rvr_1.status, rsvr_1.status, rcvr.status
-> Hash Left Join (cost=8.12..141.04 rows=2212 width=130)
Hash Cond: (r_1.id = rcvr.erp_purchase_order_id)
-> Hash Left Join (cost=7.08..131.69 rows=2212 width=126)
Hash Cond: (r_1.id = rsvr_1.erp_purchase_order_id)
-> Hash Left Join (cost=5.84..122.14 rows=2212 width=122)
Hash Cond: (r_1.id = rvr_1.erp_purchase_order_id)
-> Seq Scan on tbl_erp_purchase_orders r_1 (cost=0.00..104.67 rows=2212 width=118)
Filter: (status <> 0)
-> Hash (cost=5.12..5.12 rows=57 width=8)
-> Seq Scan on tbl_erp_purchase_order_verify_rels rvr_1 (cost=0.00..5.12 rows=57 width=8)
Filter: (user_id = 1001)
-> Hash (cost=1.23..1.23 rows=1 width=8)
-> Seq Scan on tbl_erp_purchase_order_stop_verify_rels rsvr_1 (cost=0.00..1.23 rows=1 width=8)
Filter: (user_id = 1001)
-> Hash (cost=1.04..1.04 rows=1 width=8)
-> Seq Scan on tbl_erp_purchase_order_cancel_verify_rels rcvr (cost=0.00..1.04 rows=1 width=8)
Filter: (user_id = 1001)
-> Subquery Scan on "*SELECT* 3" (cost=24.31..24.52 rows=5 width=305)
-> Group (cost=24.31..24.47 rows=5 width=313)
Group Key: r_2.id, rvr_2.status, rsvr_2.status
-> Sort (cost=24.31..24.32 rows=5 width=230)
Sort Key: r_2.id, rvr_2.status, rsvr_2.status
-> Nested Loop Left Join (cost=0.00..24.25 rows=5 width=230)
Join Filter: (rsvr_2.erp_purchase_return_id = r_2.id)
-> Nested Loop Left Join (cost=0.00..2.06 rows=1 width=226)
Join Filter: (rvr_2.erp_purchase_return_id = r_2.id)
-> Seq Scan on tbl_erp_purchase_returns r_2 (cost=0.00..1.01 rows=1 width=222)
Filter: (status <> 0)
-> Seq Scan on tbl_erp_purchase_return_verify_rels rvr_2 (cost=0.00..1.04 rows=1 width=8)
Filter: (user_id = 1001)
-> Seq Scan on tbl_erp_purchase_return_stop_verify_rels rsvr_2 (cost=0.00..22.12 rows=5 width=8)
Filter: (user_id = 1001)
-> Subquery Scan on "*SELECT* 4" (cost=24.46..24.58 rows=3 width=305)
-> Group (cost=24.46..24.55 rows=3 width=313)
Group Key: r_3.id, rvr_3.status, rsvr_3.status
-> Sort (cost=24.46..24.46 rows=3 width=226)
Sort Key: r_3.id, rvr_3.status, rsvr_3.status
-> Nested Loop Left Join (cost=0.00..24.43 rows=3 width=226)
Join Filter: (rsvr_3.erp_inventory_lost_id = r_3.id)
-> Nested Loop Left Join (cost=0.00..2.14 rows=2 width=222)
Join Filter: (rvr_3.erp_inventory_lost_id = r_3.id)
-> Seq Scan on tbl_erp_inventory_losts r_3 (cost=0.00..1.04 rows=2 width=218)
Filter: (status <> 0)
-> Materialize (cost=0.00..1.08 rows=1 width=8)
-> Seq Scan on tbl_erp_inventory_lost_verify_rels rvr_3 (cost=0.00..1.07 rows=1 width=8)
Filter: (user_id = 1001)
-> Materialize (cost=0.00..22.15 rows=5 width=8)
-> Seq Scan on tbl_erp_inventory_lost_stop_verify_rels rsvr_3 (cost=0.00..22.12 rows=5 width=8)
Filter: (user_id = 1001)
-> Subquery Scan on "*SELECT* 5" (cost=46.09..46.38 rows=7 width=210)
-> Group (cost=46.09..46.31 rows=7 width=218)
Group Key: r_4.id, rvr_4.status, rsvr_4.status
-> Sort (cost=46.09..46.10 rows=7 width=131)
Sort Key: r_4.id, rvr_4.status, rsvr_4.status
-> Nested Loop Left Join (cost=1.19..45.99 rows=7 width=131)
Join Filter: (rsvr_4.erp_inventory_overflow_id = r_4.id)
-> Hash Right Join (cost=1.19..23.33 rows=7 width=127)
Hash Cond: (rvr_4.erp_inventory_overflow_id = r_4.id)
-> Seq Scan on tbl_erp_inventory_overflow_verify_rels rvr_4 (cost=0.00..22.12 rows=5 width=8)
Filter: (user_id = 1001)
-> Hash (cost=1.10..1.10 rows=7 width=123)
-> Seq Scan on tbl_erp_inventory_overflows r_4 (cost=0.00..1.10 rows=7 width=123)
Filter: (status <> 0)
-> Materialize (cost=0.00..22.15 rows=5 width=8)
-> Seq Scan on tbl_erp_inventory_overflow_stop_verify_rels rsvr_4 (cost=0.00..22.12 rows=5 width=8)
Filter: (user_id = 1001)
-> Subquery Scan on "*SELECT* 6" (cost=24.29..24.37 rows=2 width=305)
-> Group (cost=24.29..24.35 rows=2 width=313)
Group Key: r_5.id, rvr_5.status, rsvr_5.status
-> Sort (cost=24.29..24.29 rows=2 width=226)
Sort Key: r_5.id, rvr_5.status, rsvr_5.status
-> Nested Loop Left Join (cost=0.00..24.27 rows=2 width=226)
Join Filter: (rsvr_5.erp_inventory_build_id = r_5.id)
-> Nested Loop Left Join (cost=0.00..2.09 rows=1 width=222)
Join Filter: (rvr_5.erp_inventory_build_id = r_5.id)
-> Seq Scan on tbl_erp_inventory_builds r_5 (cost=0.00..1.02 rows=1 width=218)
Filter: (status <> 0)
-> Seq Scan on tbl_erp_inventory_build_verify_rels rvr_5 (cost=0.00..1.05 rows=1 width=8)
Filter: (user_id = 1001)
-> Seq Scan on tbl_erp_inventory_build_stop_verify_rels rsvr_5 (cost=0.00..22.12 rows=5 width=8)
Filter: (user_id = 1001)
-> Subquery Scan on "*SELECT* 7" (cost=59.39..67.00 rows=179 width=305)
-> HashAggregate (cost=59.39..65.21 rows=179 width=313)
Group Key: r_6.id, rvr_6.status, rsvr_6.status
-> Hash Left Join (cost=44.38..58.05 rows=179 width=226)
Hash Cond: (r_6.id = rsvr_6.erp_inventory_disassemble_id)
-> Hash Left Join (cost=22.19..35.15 rows=179 width=222)
Hash Cond: (r_6.id = rvr_6.erp_inventory_disassemble_id)
-> Seq Scan on tbl_erp_inventory_disassembles r_6 (cost=0.00..12.25 rows=179 width=218)
Filter: (status <> 0)
-> Hash (cost=22.12..22.12 rows=5 width=8)
-> Seq Scan on tbl_erp_inventory_disassemble_verify_rels rvr_6 (cost=0.00..22.12 rows=5 width=8)
Filter: (user_id = 1001)
-> Hash (cost=22.12..22.12 rows=5 width=8)
-> Seq Scan on tbl_erp_inventory_disassemble_stop_verify_rels rsvr_6 (cost=0.00..22.12 rows=5 width=8)
Filter: (user_id = 1001)
-> Subquery Scan on "*SELECT* 8" (cost=135.50..221.05 rows=1711 width=205)
-> HashAggregate (cost=135.50..203.94 rows=1711 width=217)
Group Key: r_7.id, rvr_7.status, rsvr_7.status, rcvr_1.status
-> Hash Left Join (cost=6.43..118.39 rows=1711 width=138)
Hash Cond: (r_7.id = rcvr_1.erp_sales_order_id)
-> Hash Left Join (cost=5.40..110.94 rows=1711 width=134)
Hash Cond: (r_7.id = rsvr_7.erp_sales_order_id)
-> Hash Left Join (cost=4.15..103.26 rows=1711 width=130)
Hash Cond: (r_7.id = rvr_7.erp_sales_order_id)
-> Seq Scan on tbl_erp_sales_orders r_7 (cost=0.00..91.44 rows=1711 width=126)
Filter: (status <> 0)
-> Hash (cost=2.58..2.58 rows=126 width=8)
-> Seq Scan on tbl_erp_sales_order_verify_rels rvr_7 (cost=0.00..2.58 rows=126 width=8)
Filter: (user_id = 1001)
-> Hash (cost=1.24..1.24 rows=1 width=8)
-> Seq Scan on tbl_erp_sales_order_stop_verify_rels rsvr_7 (cost=0.00..1.24 rows=1 width=8)
Filter: (user_id = 1001)
-> Hash (cost=1.01..1.01 rows=1 width=8)
-> Seq Scan on tbl_erp_sales_order_cancel_verify_rels rcvr_1 (cost=0.00..1.01 rows=1 width=8)
Filter: (user_id = 1001)
-> Subquery Scan on "*SELECT* 9" (cost=23.29..29.71 rows=151 width=214)
-> HashAggregate (cost=23.29..28.20 rows=151 width=222)
Group Key: r_8.id, rvr_8.status, rsvr_8.status
-> Hash Left Join (cost=11.88..22.16 rows=151 width=139)
Hash Cond: (r_8.id = rsvr_8.erp_sales_outbound_id)
-> Hash Right Join (cost=10.79..20.50 rows=151 width=135)
Hash Cond: (rvr_8.erp_sales_outbound_id = r_8.id)
-> Seq Scan on tbl_erp_sales_outbound_verify_rels rvr_8 (cost=0.00..9.32 rows=142 width=8)
Filter: (user_id = 1001)
-> Hash (cost=8.90..8.90 rows=151 width=131)
-> Seq Scan on tbl_erp_sales_outbounds r_8 (cost=0.00..8.90 rows=151 width=131)
Filter: (status <> 0)
-> Hash (cost=1.07..1.07 rows=1 width=8)
-> Seq Scan on tbl_erp_sales_outbound_stop_verify_rels rsvr_8 (cost=0.00..1.07 rows=1 width=8)
Filter: (user_id = 1001)
-> Subquery Scan on "*SELECT* 10" (cost=24.31..24.52 rows=5 width=305)
-> Group (cost=24.31..24.47 rows=5 width=313)
Group Key: r_9.id, rvr_9.status, rsvr_9.status
-> Sort (cost=24.31..24.32 rows=5 width=230)
Sort Key: r_9.id, rvr_9.status, rsvr_9.status
-> Nested Loop Left Join (cost=0.00..24.25 rows=5 width=230)
Join Filter: (rsvr_9.erp_sales_return_id = r_9.id)
-> Nested Loop Left Join (cost=0.00..2.06 rows=1 width=226)
Join Filter: (rvr_9.erp_sales_return_id = r_9.id)
-> Seq Scan on tbl_erp_sales_returns r_9 (cost=0.00..1.01 rows=1 width=222)
Filter: (status <> 0)
-> Seq Scan on tbl_erp_sales_return_verify_rels rvr_9 (cost=0.00..1.04 rows=1 width=8)
Filter: (user_id = 1001)
-> Seq Scan on tbl_erp_sales_return_stop_verify_rels rsvr_9 (cost=0.00..22.12 rows=5 width=8)
Filter: (user_id = 1001)
-> Subquery Scan on "*SELECT* 11" (cost=4.12..4.97 rows=20 width=168)
-> HashAggregate (cost=4.12..4.77 rows=20 width=176)
Group Key: r_10.id, rvr_10.status, rsvr_10.status
-> Hash Left Join (cost=2.55..3.97 rows=20 width=97)
Hash Cond: (r_10.id = rsvr_10.erp_purchase_gift_id)
-> Hash Left Join (cost=1.46..2.80 rows=20 width=93)
Hash Cond: (r_10.id = rvr_10.erp_purchase_gift_id)
-> Seq Scan on tbl_erp_purchase_gifts r_10 (cost=0.00..1.25 rows=20 width=89)
Filter: (status <> 0)
-> Hash (cost=1.45..1.45 rows=1 width=8)
-> Seq Scan on tbl_erp_purchase_gift_verify_rels rvr_10 (cost=0.00..1.45 rows=1 width=8)
Filter: (user_id = 1001)
-> Hash (cost=1.07..1.07 rows=1 width=8)
-> Seq Scan on tbl_erp_purchase_gift_stop_verify_rels rsvr_10 (cost=0.00..1.07 rows=1 width=8)
Filter: (user_id = 1001)
-> Subquery Scan on "*SELECT* 12" (cost=19.36..24.55 rows=122 width=195)
-> HashAggregate (cost=19.36..23.33 rows=122 width=203)
Group Key: r_11.id, rvr_11.status, rsvr_11.status
-> Hash Left Join (cost=10.11..18.45 rows=122 width=120)
Hash Cond: (r_11.id = rsvr_11.erp_sales_gift_id)
-> Hash Right Join (cost=9.06..16.93 rows=122 width=116)
Hash Cond: (rvr_11.erp_sales_gift_id = r_11.id)
-> Seq Scan on tbl_erp_sales_gift_verify_rels rvr_11 (cost=0.00..7.54 rows=121 width=8)
Filter: (user_id = 1001)
-> Hash (cost=7.54..7.54 rows=122 width=112)
-> Seq Scan on tbl_erp_sales_gifts r_11 (cost=0.00..7.54 rows=122 width=112)
Filter: (status <> 0)
-> Hash (cost=1.04..1.04 rows=1 width=8)
-> Seq Scan on tbl_erp_sales_gift_stop_verify_rels rsvr_11 (cost=0.00..1.04 rows=1 width=8)
Filter: (user_id = 1001)
-> Subquery Scan on "*SELECT* 13" (cost=134.53..227.60 rows=2190 width=146)
-> HashAggregate (cost=134.53..205.70 rows=2190 width=154)
Group Key: r_12.id, rvr_12.status, rsvr_12.status
-> Hash Left Join (cost=5.91..118.10 rows=2190 width=115)
Hash Cond: (r_12.id = rsvr_12.erp_collect_ticket_id)
-> Hash Left Join (cost=4.82..108.79 rows=2190 width=111)
Hash Cond: (r_12.id = rvr_12.erp_collect_ticket_id)
-> Seq Scan on tbl_erp_collect_tickets r_12 (cost=0.00..95.42 rows=2190 width=107)
Filter: (status <> 0)
-> Hash (cost=4.41..4.41 rows=33 width=8)
-> Seq Scan on tbl_erp_collect_ticket_verify_rels rvr_12 (cost=0.00..4.41 rows=33 width=8)
Filter: (user_id = 1001)
-> Hash (cost=1.07..1.07 rows=1 width=8)
-> Seq Scan on tbl_erp_collect_ticket_stop_verify_rels rsvr_12 (cost=0.00..1.07 rows=1 width=8)
Filter: (user_id = 1001)
-> Subquery Scan on "*SELECT* 14" (cost=150.90..250.65 rows=2347 width=151)
-> HashAggregate (cost=150.90..227.18 rows=2347 width=159)
Group Key: r_13.id, rvr_13.status, rsvr_13.status
-> Hash Left Join (cost=9.68..133.30 rows=2347 width=121)
Hash Cond: (r_13.id = rsvr_13.erp_payment_ticket_id)
-> Hash Left Join (cost=8.55..123.36 rows=2347 width=117)
Hash Cond: (r_13.id = rvr_13.erp_payment_ticket_id)
-> Seq Scan on tbl_erp_payment_tickets r_13 (cost=0.00..103.39 rows=2347 width=113)
Filter: (status <> 0)
-> Hash (cost=5.28..5.28 rows=262 width=8)
-> Seq Scan on tbl_erp_payment_ticket_verify_rels rvr_13 (cost=0.00..5.28 rows=262 width=8)
Filter: (user_id = 1001)
-> Hash (cost=1.11..1.11 rows=1 width=8)
-> Seq Scan on tbl_erp_payment_ticket_stop_verify_rels rsvr_13 (cost=0.00..1.11 rows=1 width=8)
Filter: (user_id = 1001)
-> Subquery Scan on "*SELECT* 15" (cost=8.73..12.09 rows=79 width=170)
-> HashAggregate (cost=8.73..11.30 rows=79 width=178)
Group Key: r_14.id, rvr_14.status, rsvr_14.status
-> Hash Left Join (cost=6.04..8.14 rows=79 width=135)
Hash Cond: (r_14.id = rsvr_14.erp_cost_ticket_id)
-> Hash Right Join (cost=5.01..6.81 rows=79 width=131)
Hash Cond: (rvr_14.erp_cost_ticket_id = r_14.id)
-> Seq Scan on tbl_erp_cost_ticket_verify_rels rvr_14 (cost=0.00..1.65 rows=52 width=8)
Filter: (user_id = 1001)
-> Hash (cost=4.03..4.03 rows=79 width=127)
-> Seq Scan on tbl_erp_cost_tickets r_14 (cost=0.00..4.03 rows=79 width=127)
Filter: (status <> 0)
-> Hash (cost=1.01..1.01 rows=1 width=8)
-> Seq Scan on tbl_erp_cost_ticket_stop_verify_rels rsvr_14 (cost=0.00..1.01 rows=1 width=8)
Filter: (user_id = 1001)
-> Subquery Scan on "*SELECT* 16" (cost=26.77..28.43 rows=39 width=172)
-> HashAggregate (cost=26.77..28.04 rows=39 width=180)
Group Key: r_15.id, rvr_15.status, rsvr_15.status
-> Hash Left Join (cost=23.66..26.48 rows=39 width=141)
Hash Cond: (r_15.id = rsvr_15.erp_other_income_ticket_id)
-> Hash Left Join (cost=1.47..4.13 rows=39 width=137)
Hash Cond: (r_15.id = rvr_15.erp_other_income_ticket_id)
-> Seq Scan on tbl_erp_other_income_tickets r_15 (cost=0.00..2.50 rows=39 width=133)
Filter: (status <> 0)
-> Hash (cost=1.46..1.46 rows=1 width=8)
-> Seq Scan on tbl_erp_other_income_ticket_verify_rels rvr_15 (cost=0.00..1.46 rows=1 width=8)
Filter: (user_id = 1001)
-> Hash (cost=22.12..22.12 rows=5 width=8)
-> Seq Scan on tbl_erp_other_income_ticket_stop_verify_rels rsvr_15 (cost=0.00..22.12 rows=5 width=8)
Filter: (user_id = 1001)
-> Subquery Scan on "*SELECT* 17" (cost=24.78..25.16 rows=9 width=305)
-> Group (cost=24.78..25.07 rows=9 width=313)
Group Key: r_16.id, rvr_16.status, rsvr_16.status
-> Sort (cost=24.78..24.80 rows=9 width=234)
Sort Key: r_16.id, rvr_16.status, rsvr_16.status
-> Nested Loop Left Join (cost=1.24..24.64 rows=9 width=234)
Join Filter: (rvr_16.erp_cost_convert_ticket_id = r_16.id)
-> Hash Right Join (cost=1.24..23.38 rows=9 width=230)
Hash Cond: (rsvr_16.erp_cost_convert_ticket_id = r_16.id)
-> Seq Scan on tbl_erp_cost_convert_ticket_stop_verify_rels rsvr_16 (cost=0.00..22.12 rows=5 width=8)
Filter: (user_id = 1001)
-> Hash (cost=1.12..1.12 rows=9 width=226)
-> Seq Scan on tbl_erp_cost_convert_tickets r_16 (cost=0.00..1.12 rows=9 width=226)
Filter: (status <> 0)
-> Materialize (cost=0.00..1.13 rows=1 width=8)
-> Seq Scan on tbl_erp_cost_convert_ticket_verify_rels rvr_16 (cost=0.00..1.12 rows=1 width=8)
Filter: (user_id = 1001)
-> Subquery Scan on "*SELECT* 18" (cost=4.21..5.10 rows=21 width=305)
-> HashAggregate (cost=4.21..4.89 rows=21 width=313)
Group Key: r_17.id, rvr_17.status, rsvr_17.status
-> Hash Left Join (cost=2.60..4.05 rows=21 width=226)
Hash Cond: (r_17.id = rsvr_17.erp_bank_transfer_ticket_id)
-> Hash Left Join (cost=1.56..2.93 rows=21 width=222)
Hash Cond: (r_17.id = rvr_17.erp_bank_transfer_ticket_id)
-> Seq Scan on tbl_erp_bank_transfer_tickets r_17 (cost=0.00..1.27 rows=21 width=218)
Filter: (status <> 0)
-> Hash (cost=1.55..1.55 rows=1 width=8)
-> Seq Scan on tbl_erp_bank_transfer_ticket_verify_rels rvr_17 (cost=0.00..1.55 rows=1 width=8)
Filter: (user_id = 1001)
-> Hash (cost=1.02..1.02 rows=1 width=8)
-> Seq Scan on tbl_erp_bank_transfer_ticket_stop_verify_rels rsvr_17 (cost=0.00..1.02 rows=1 width=8)
Filter: (user_id = 1001)
-> Subquery Scan on "*SELECT* 19" (cost=1053.88..1413.68 rows=8466 width=159)
-> HashAggregate (cost=1053.88..1329.02 rows=8466 width=167)
Group Key: r_18.id, rvr_18.status, rsvr_18.status
-> Hash Left Join (cost=551.85..990.38 rows=8466 width=121)
Hash Cond: (r_18.id = rsvr_18.erp_cash_cost_ticket_id)
-> Hash Right Join (cost=550.69..957.46 rows=8466 width=117)
Hash Cond: (rvr_18.erp_cash_cost_ticket_id = r_18.id)
-> Seq Scan on tbl_erp_cash_cost_ticket_verify_rels rvr_18 (cost=0.00..384.75 rows=8386 width=8)
Filter: (user_id = 1001)
-> Hash (cost=444.86..444.86 rows=8466 width=113)
-> Seq Scan on tbl_erp_cash_cost_tickets r_18 (cost=0.00..444.86 rows=8466 width=113)
Filter: (status <> 0)
-> Hash (cost=1.15..1.15 rows=1 width=8)
-> Seq Scan on tbl_erp_cash_cost_ticket_stop_verify_rels rsvr_18 (cost=0.00..1.15 rows=1 width=8)
Filter: (user_id = 1001)
-> Subquery Scan on "*SELECT* 20" (cost=58.84..65.60 rows=159 width=305)
-> HashAggregate (cost=58.84..64.01 rows=159 width=313)
Group Key: r_19.id, rvr_19.status, rsvr_19.status
-> Hash Left Join (cost=44.38..57.65 rows=159 width=267)
Hash Cond: (r_19.id = rsvr_19.erp_advance_payment_ticket_id)
-> Hash Left Join (cost=22.19..34.82 rows=159 width=263)
Hash Cond: (r_19.id = rvr_19.erp_advance_payment_ticket_id)
-> Seq Scan on tbl_erp_advance_payment_tickets r_19 (cost=0.00..12.00 rows=159 width=259)
Filter: (status <> 0)
-> Hash (cost=22.12..22.12 rows=5 width=8)
-> Seq Scan on tbl_erp_advance_payment_ticket_verify_rels rvr_19 (cost=0.00..22.12 rows=5 width=8)
Filter: (user_id = 1001)
-> Hash (cost=22.12..22.12 rows=5 width=8)
-> Seq Scan on tbl_erp_advance_payment_ticket_stop_verify_rels rsvr_19 (cost=0.00..22.12 rows=5 width=8)
Filter: (user_id = 1001)
-> Subquery Scan on "*SELECT* 21" (cost=27.55..29.38 rows=43 width=159)
-> HashAggregate (cost=27.55..28.95 rows=43 width=167)
Group Key: r_20.id, rvr_20.status, rsvr_20.status
-> Hash Left Join (cost=23.34..27.23 rows=43 width=128)
Hash Cond: (r_20.id = rsvr_20.erp_other_payment_ticket_id)
-> Hash Left Join (cost=1.15..4.87 rows=43 width=124)
Hash Cond: (r_20.id = rvr_20.erp_other_payment_ticket_id)
-> Seq Scan on tbl_erp_other_payment_tickets r_20 (cost=0.00..3.55 rows=43 width=120)
Filter: (status <> 0)
-> Hash (cost=1.14..1.14 rows=1 width=8)
-> Seq Scan on tbl_erp_other_payment_ticket_verify_rels rvr_20 (cost=0.00..1.14 rows=1 width=8)
Filter: (user_id = 1001)
-> Hash (cost=22.12..22.12 rows=5 width=8)
-> Seq Scan on tbl_erp_other_payment_ticket_stop_verify_rels rsvr_20 (cost=0.00..22.12 rows=5 width=8)
Filter: (user_id = 1001)
-> Subquery Scan on "*SELECT* 22" (cost=5.65..7.48 rows=43 width=180)
-> HashAggregate (cost=5.65..7.05 rows=43 width=188)
Group Key: r_21.id, rvr_21.status, rsvr_21.status
-> Hash Left Join (cost=2.44..5.33 rows=43 width=149)
Hash Cond: (r_21.id = rsvr_21.erp_other_collect_ticket_id)
-> Hash Left Join (cost=1.41..4.13 rows=43 width=145)
Hash Cond: (r_21.id = rvr_21.erp_other_collect_ticket_id)
-> Seq Scan on tbl_erp_other_collect_tickets r_21 (cost=0.00..2.55 rows=43 width=141)
Filter: (status <> 0)
-> Hash (cost=1.40..1.40 rows=1 width=8)
-> Seq Scan on tbl_erp_other_collect_ticket_verify_rels rvr_21 (cost=0.00..1.40 rows=1 width=8)
Filter: (user_id = 1001)
-> Hash (cost=1.01..1.01 rows=1 width=8)
-> Seq Scan on tbl_erp_other_collect_ticket_stop_verify_rels rsvr_21 (cost=0.00..1.01 rows=1 width=8)
Filter: (user_id = 1001)
-> Subquery Scan on "*SELECT* 23" (cost=8.19..10.44 rows=45 width=248)
-> HashAggregate (cost=8.19..9.99 rows=45 width=260)
Group Key: r_22.id, rvr_22.status, rsvr_22.status, rcvr_2.status
-> Hash Left Join (cost=5.26..7.74 rows=45 width=181)
Hash Cond: (r_22.id = rcvr_2.erp_purchase_cost_id)
-> Hash Left Join (cost=4.23..6.52 rows=45 width=177)
Hash Cond: (r_22.id = rsvr_22.erp_purchase_cost_id)
-> Hash Right Join (cost=3.14..5.25 rows=45 width=173)
Hash Cond: (rvr_22.erp_purchase_cost_id = r_22.id)
-> Seq Scan on tbl_erp_purchase_cost_verify_rels rvr_22 (cost=0.00..2.00 rows=40 width=8)
Filter: (user_id = 1001)
-> Hash (cost=2.58..2.58 rows=45 width=169)
-> Seq Scan on tbl_erp_purchase_costs r_22 (cost=0.00..2.58 rows=45 width=169)
Filter: (status <> 0)
-> Hash (cost=1.07..1.07 rows=1 width=8)
-> Seq Scan on tbl_erp_purchase_cost_stop_verify_rels rsvr_22 (cost=0.00..1.07 rows=1 width=8)
Filter: (user_id = 1001)
-> Hash (cost=1.02..1.02 rows=1 width=8)
-> Seq Scan on tbl_erp_purchase_cost_cancel_verify_rels rcvr_2 (cost=0.00..1.02 rows=1 width=8)
Filter: (user_id = 1001)
-> Subquery Scan on "*SELECT* 24" (cost=25.01..25.57 rows=13 width=204)
-> Group (cost=25.01..25.44 rows=13 width=212)
Group Key: r_23.id, rvr_23.status, rsvr_23.status
-> Sort (cost=25.01..25.05 rows=13 width=158)
Sort Key: r_23.id, rvr_23.status, rsvr_23.status
-> Nested Loop Left Join (cost=1.34..24.77 rows=13 width=158)
Join Filter: (rvr_23.erp_wage_ticket_id = r_23.id)
-> Hash Right Join (cost=1.34..23.48 rows=13 width=154)
Hash Cond: (rsvr_23.erp_wage_ticket_id = r_23.id)
-> Seq Scan on tbl_erp_wage_ticket_stop_verify_rels rsvr_23 (cost=0.00..22.12 rows=5 width=8)
Filter: (user_id = 1001)
-> Hash (cost=1.18..1.18 rows=13 width=150)
-> Seq Scan on tbl_erp_wage_tickets r_23 (cost=0.00..1.18 rows=13 width=150)
Filter: (status <> 0)
-> Materialize (cost=0.00..1.10 rows=1 width=8)
-> Seq Scan on tbl_erp_wage_ticket_verify_rels rvr_23 (cost=0.00..1.10 rows=1 width=8)
Filter: (user_id = 1001)
-> Subquery Scan on "*SELECT* 25" (cost=24.91..25.29 rows=9 width=305)
-> Group (cost=24.91..25.20 rows=9 width=313)
Group Key: r_24.id, rvr_24.status, rsvr_24.status
-> Sort (cost=24.91..24.93 rows=9 width=259)
Sort Key: r_24.id, rvr_24.status, rsvr_24.status
-> Nested Loop Left Join (cost=1.24..24.76 rows=9 width=259)
Join Filter: (rvr_24.erp_social_insurance_id = r_24.id)
-> Hash Right Join (cost=1.24..23.38 rows=9 width=255)
Hash Cond: (rsvr_24.erp_social_insurance_id = r_24.id)
-> Seq Scan on tbl_erp_social_insurance_stop_verify_rels rsvr_24 (cost=0.00..22.12 rows=5 width=8)
Filter: (user_id = 1001)
-> Hash (cost=1.12..1.12 rows=9 width=251)
-> Seq Scan on tbl_erp_social_insurances r_24 (cost=0.00..1.12 rows=9 width=251)
Filter: (status <> 0)
-> Materialize (cost=0.00..1.25 rows=1 width=8)
-> Seq Scan on tbl_erp_social_insurance_verify_rels rvr_24 (cost=0.00..1.25 rows=1 width=8)
Filter: (user_id = 1001)
-> Subquery Scan on "*SELECT* 26" (cost=24.65..24.90 rows=6 width=305)
-> Group (cost=24.65..24.84 rows=6 width=313)
Group Key: r_25.id, rvr_25.status, rsvr_25.status
-> Sort (cost=24.65..24.66 rows=6 width=259)
Sort Key: r_25.id, rvr_25.status, rsvr_25.status
-> Nested Loop Left Join (cost=1.16..24.57 rows=6 width=259)
Join Filter: (rvr_25.erp_provident_fund_id = r_25.id)
-> Hash Right Join (cost=1.16..23.30 rows=6 width=255)
Hash Cond: (rsvr_25.erp_provident_fund_id = r_25.id)
-> Seq Scan on tbl_erp_provident_fund_stop_verify_rels rsvr_25 (cost=0.00..22.12 rows=5 width=8)
Filter: (user_id = 1001)
-> Hash (cost=1.09..1.09 rows=6 width=251)
-> Seq Scan on tbl_erp_provident_funds r_25 (cost=0.00..1.09 rows=6 width=251)
Filter: (status <> 0)
-> Materialize (cost=0.00..1.18 rows=1 width=8)
-> Seq Scan on tbl_erp_provident_fund_verify_rels rvr_25 (cost=0.00..1.18 rows=1 width=8)
Filter: (user_id = 1001)
-> Subquery Scan on "*SELECT* 27" (cost=24.63..24.93 rows=7 width=305)
-> Group (cost=24.63..24.86 rows=7 width=313)
Group Key: r_26.id, rvr_26.status, rsvr_26.status
-> Sort (cost=24.63..24.65 rows=7 width=259)
Sort Key: r_26.id, rvr_26.status, rsvr_26.status
-> Nested Loop Left Join (cost=1.19..24.53 rows=7 width=259)
Join Filter: (rvr_26.erp_personal_tax_id = r_26.id)
-> Hash Right Join (cost=1.19..23.33 rows=7 width=255)
Hash Cond: (rsvr_26.erp_personal_tax_id = r_26.id)
-> Seq Scan on tbl_erp_personal_tax_stop_verify_rels rsvr_26 (cost=0.00..22.12 rows=5 width=8)
Filter: (user_id = 1001)
-> Hash (cost=1.10..1.10 rows=7 width=251)
-> Seq Scan on tbl_erp_personal_taxs r_26 (cost=0.00..1.10 rows=7 width=251)
Filter: (status <> 0)
-> Materialize (cost=0.00..1.10 rows=1 width=8)
-> Seq Scan on tbl_erp_personal_tax_verify_rels rvr_26 (cost=0.00..1.10 rows=1 width=8)
Filter: (user_id = 1001)
-> Subquery Scan on "*SELECT* 28" (cost=24.55..24.72 rows=4 width=305)
-> Group (cost=24.55..24.68 rows=4 width=313)
Group Key: r_27.id, rvr_27.status, rsvr_27.status
-> Sort (cost=24.55..24.56 rows=4 width=259)
Sort Key: r_27.id, rvr_27.status, rsvr_27.status
-> Nested Loop Left Join (cost=0.00..24.51 rows=4 width=259)
Join Filter: (rsvr_27.erp_wage_prize_id = r_27.id)
-> Nested Loop Left Join (cost=0.00..2.15 rows=3 width=255)
Join Filter: (rvr_27.erp_wage_prize_id = r_27.id)
-> Seq Scan on tbl_erp_wage_prizes r_27 (cost=0.00..1.05 rows=3 width=251)
Filter: (status <> 0)
-> Materialize (cost=0.00..1.05 rows=1 width=8)
-> Seq Scan on tbl_erp_wage_prize_verify_rels rvr_27 (cost=0.00..1.05 rows=1 width=8)
Filter: (user_id = 1001)
-> Materialize (cost=0.00..22.15 rows=5 width=8)
-> Seq Scan on tbl_erp_wage_prize_stop_verify_rels rsvr_27 (cost=0.00..22.12 rows=5 width=8)
Filter: (user_id = 1001)
-> Subquery Scan on "*SELECT* 29" (cost=281.11..291.41 rows=229 width=305)
-> HashAggregate (cost=281.11..289.12 rows=229 width=313)
Group Key: r_28.id, rvr_28.status, rsvr_28.status
-> Hash Left Join (cost=255.72..278.82 rows=229 width=203)
Hash Cond: (r_28.id = rsvr_28.erp_profit_distribute_id)
-> Hash Right Join (cost=233.53..255.72 rows=229 width=199)
Hash Cond: (rvr_28.erp_profit_distribute_id = r_28.id)
-> Seq Scan on tbl_erp_profit_distribute_verify_rels rvr_28 (cost=0.00..22.12 rows=5 width=8)
Filter: (user_id = 1001)
-> Hash (cost=230.67..230.67 rows=229 width=195)
-> Hash Left Join (cost=217.19..230.67 rows=229 width=195)
Hash Cond: (r_28.project_id = p.id)
-> Seq Scan on tbl_erp_profit_distributes r_28 (cost=0.00..12.88 rows=229 width=194)
Filter: (status <> 0)
-> Hash (cost=177.64..177.64 rows=3164 width=9)
-> Seq Scan on tbl_projects p (cost=0.00..177.64 rows=3164 width=9)
-> Hash (cost=22.12..22.12 rows=5 width=8)
-> Seq Scan on tbl_erp_profit_distribute_stop_verify_rels rsvr_28 (cost=0.00..22.12 rows=5 width=8)
Filter: (user_id = 1001)