QUERY PLAN
Limit (cost=38.69..38.70 rows=5 width=142)
-> Sort (cost=38.69..38.70 rows=5 width=142)
Sort Key: p.updated_at DESC
-> Group (cost=38.60..38.63 rows=5 width=142)
Group Key: p.id
-> Sort (cost=38.60..38.62 rows=5 width=142)
Sort Key: p.id
-> Nested Loop (cost=0.28..38.55 rows=5 width=142)
-> Seq Scan on tbl_erp_inventory_products eip (cost=0.00..1.06 rows=5 width=4)
Filter: (inventory > '0'::numeric)
-> Index Scan using tbl_products_pkey on tbl_products p (cost=0.28..7.49 rows=1 width=142)
Index Cond: (id = eip.product_id)