QUERY PLAN
Aggregate (cost=32.34..32.35 rows=1 width=64)
-> Hash Join (cost=25.84..32.33 rows=1 width=10)
Hash Cond: (t.id = esosps.erp_sales_outbound_id)
-> Seq Scan on tbl_erp_sales_outbounds t (cost=0.00..5.92 rows=146 width=8)
Filter: (status = 2)
-> Hash (cost=25.83..25.83 rows=1 width=14)
-> Hash Right Join (cost=11.69..25.83 rows=1 width=14)
Hash Cond: (eipss.erp_sales_outbound_spent_product_id = esosps.id)
-> Seq Scan on tbl_erp_inventory_product_spents eipss (cost=0.00..12.65 rows=565 width=14)
-> Hash (cost=11.68..11.68 rows=1 width=8)
-> Seq Scan on tbl_erp_sales_outbound_spent_products esosps (cost=0.00..11.68 rows=1 width=8)
Filter: (product_id = 2073)