QUERY PLAN
Aggregate (cost=152.58..152.59 rows=1 width=64)
-> HashAggregate (cost=96.00..124.29 rows=1886 width=68)
Group Key: p.id
-> Hash Left Join (cost=1.09..77.14 rows=1886 width=14)
Hash Cond: (p.id = eip.product_id)
-> Seq Scan on tbl_products p (cost=0.00..61.86 rows=1886 width=20)
-> Hash (cost=1.04..1.04 rows=4 width=14)
-> Seq Scan on tbl_erp_inventory_products eip (cost=0.00..1.04 rows=4 width=14)