Aggregate (cost=798.93..798.94 rows=1 width=8) |
-> Group (cost=798.39..798.54 rows=31 width=369) |
Group Key: r.id |
-> Sort (cost=798.39..798.46 rows=31 width=4) |
Sort Key: r.id |
-> Hash Right Join (cost=168.79..797.62 rows=31 width=4) |
Hash Cond: (cs.object_id = c.id) |
-> Seq Scan on tbl_attachement_relationships cs (cost=0.00..621.20 rows=2016 width=4) |
Filter: (object_type = 108) |
-> Hash (cost=168.40..168.40 rows=31 width=8) |
-> Hash Right Join (cost=100.41..168.40 rows=31 width=8) |
Hash Cond: (c.id = r.purchase_contract_id) |
-> Seq Scan on tbl_purchase_contracts c (cost=0.00..60.13 rows=2013 width=4) |
-> Hash (cost=100.02..100.02 rows=31 width=8) |
-> Hash Right Join (cost=86.27..100.02 rows=31 width=8) |
Hash Cond: (epop.erp_purchase_order_id = r.id) |
-> Seq Scan on tbl_erp_purchase_order_products epop (cost=0.00..12.70 rows=270 width=8) |
-> Hash (cost=85.88..85.88 rows=31 width=8) |
-> Hash Right Join (cost=63.64..85.88 rows=31 width=8) |
Hash Cond: (rvr.erp_purchase_order_id = r.id) |
Filter: ((r.created_by = 1001) OR (rvr.user_id = 1001) OR (r.created_by = ANY ('{1000,1001,1004,1005,1011,1013,1015,1017,1022,1023,5016,5064,5085,5087,5248,5250,5252,5295,5300,5311,5332,5360,5388,5446,5449}'::integer[]))) |
-> Seq Scan on tbl_erp_purchase_order_verify_rels rvr (cost=0.00..19.70 rows=970 width=8) |
-> Hash (cost=63.11..63.11 rows=42 width=12) |
-> Seq Scan on tbl_erp_purchase_orders r (cost=0.00..63.11 rows=42 width=12) |
Filter: ((NOT inventory_status) AND (NOT is_done) AND (status = 2)) |