Aggregate (cost=162.61..162.62 rows=1 width=8) |
-> Sort (cost=159.90..160.35 rows=181 width=413) |
Sort Key: r.updated_at DESC |
-> HashAggregate (cost=151.30..153.11 rows=181 width=413) |
Group Key: r.id |
-> Hash Right Join (cost=102.97..150.85 rows=181 width=12) |
Hash Cond: (epop.erp_sales_order_id = r.id) |
-> Seq Scan on tbl_erp_sales_order_products epop (cost=0.00..39.23 rows=1823 width=8) |
-> Hash (cost=101.03..101.03 rows=155 width=12) |
-> Hash Right Join (cost=78.77..101.03 rows=155 width=12) |
Hash Cond: (rvr.erp_sales_order_id = r.id) |
Filter: ((r.created_by = 1004) OR (rvr.user_id = 1004) OR (r.created_by = 1004)) |
-> Seq Scan on tbl_erp_sales_order_verify_rels rvr (cost=0.00..19.70 rows=970 width=8) |
-> Hash (cost=59.28..59.28 rows=1559 width=16) |
-> Seq Scan on tbl_erp_sales_orders r (cost=0.00..59.28 rows=1559 width=16) |
Filter: ((status <> 0) OR ((status = 0) AND (created_by = 1004))) |