QUERY PLAN
Nested Loop (cost=0.29..20.17 rows=1 width=560)
-> Nested Loop (cost=0.15..19.82 rows=1 width=564)
-> Seq Scan on tbl_erp_inventory_disassemble_spent_product_sns r (cost=0.00..11.62 rows=1 width=560)
Filter: (erp_inventory_product_sn_id = 51)
-> Index Scan using tbl_erp_inventory_disassemble_spent_products_pkey on tbl_erp_inventory_disassemble_spent_products eprp (cost=0.15..8.17 rows=1 width=8)
Index Cond: (id = r.erp_inventory_disassemble_spent_product_id)
-> Index Scan using tbl_erp_inventory_disassembles_pkey on tbl_erp_inventory_disassembles epr (cost=0.14..0.27 rows=1 width=4)
Index Cond: (id = eprp.erp_inventory_disassemble_id)
Filter: (status = ANY ('{1,2}'::integer[]))