Limit (cost=493.90..493.90 rows=1 width=369) |
-> Sort (cost=493.90..493.90 rows=1 width=369) |
Sort Key: r.updated_at DESC |
-> Group (cost=493.88..493.89 rows=1 width=369) |
Group Key: r.id |
-> Sort (cost=493.88..493.89 rows=1 width=369) |
Sort Key: r.id |
-> Nested Loop Left Join (cost=16.82..493.87 rows=1 width=369) |
Join Filter: (epop.erp_purchase_order_id = r.id) |
-> Nested Loop Left Join (cost=16.82..477.80 rows=1 width=369) |
-> Hash Right Join (cost=12.51..35.00 rows=1 width=369) |
Hash Cond: (rvr.erp_purchase_order_id = r.id) |
Filter: ((r.created_by = 5016) OR (rvr.user_id = 5016) 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=12.50..12.50 rows=1 width=369) |
-> Seq Scan on tbl_erp_purchase_orders r (cost=0.00..12.50 rows=1 width=369) |
Filter: (((NOT inventory_status) OR (NOT is_done)) AND (status = 2)) |
-> Hash Right Join (cost=4.31..442.79 rows=1 width=4) |
Hash Cond: (cs.object_id = c.id) |
-> Seq Scan on tbl_attachement_relationships cs (cost=0.00..433.06 rows=2065 width=4) |
Filter: (object_type = 108) |
-> Hash (cost=4.29..4.29 rows=1 width=4) |
-> Index Only Scan using tbl_purchase_contracts_pkey on tbl_purchase_contracts c (cost=0.28..4.29 rows=1 width=4) |
Index Cond: (id = r.purchase_contract_id) |
-> Seq Scan on tbl_erp_purchase_order_products epop (cost=0.00..12.70 rows=270 width=8) |