QUERY PLAN
Nested Loop (cost=0.00..14.17 rows=1 width=560)
Join Filter: (eprp.erp_inventory_build_id = epr.id)
-> Nested Loop (cost=0.00..12.90 rows=1 width=564)
Join Filter: (r.erp_inventory_build_spent_product_id = eprp.id)
-> Seq Scan on tbl_erp_inventory_build_spent_product_sns r (cost=0.00..11.62 rows=1 width=560)
Filter: (erp_inventory_product_sn_id = 68)
-> Seq Scan on tbl_erp_inventory_build_spent_products eprp (cost=0.00..1.12 rows=12 width=8)
-> Seq Scan on tbl_erp_inventory_builds epr (cost=0.00..1.15 rows=10 width=4)
Filter: (status = ANY ('{1,2}'::integer[]))