QUERY PLAN
Index Scan using tbl_projects_pkey on tbl_projects p (cost=0.28..52.04 rows=1 width=429)
Index Cond: (id = 4174)
SubPlan 1
-> Aggregate (cost=43.72..43.73 rows=1 width=32)
-> Seq Scan on tbl_invoices i (cost=0.00..43.71 rows=1 width=6)
Filter: (project_id = p.id)