GroupAggregate (cost=9.65..403.26 rows=1 width=486) |
Group Key: p.id |
-> Nested Loop Left Join (cost=9.65..366.54 rows=1 width=374) |
Join Filter: (sl.project_id = p.id) |
-> Nested Loop Left Join (cost=4.96..187.16 rows=1 width=366) |
Join Filter: (arrive.project_id = p.id) |
-> Index Scan using tbl_projects_pkey on tbl_projects p (cost=0.28..8.30 rows=1 width=358) |
Index Cond: (id = 1018) |
-> Bitmap Heap Scan on tbl_work_logs arrive (cost=4.68..178.85 rows=1 width=12) |
Recheck Cond: (project_id = 1018) |
Filter: ((NOT is_draft) AND (location_in_id IS NOT NULL) AND (location_out_id IS NOT NULL) AND (client_id IS NOT NULL) AND (scenario_id = 1)) |
-> Bitmap Index Scan on tbl_work_logs_project_id_idx (cost=0.00..4.68 rows=52 width=0) |
Index Cond: (project_id = 1018) |
-> Bitmap Heap Scan on tbl_work_logs sl (cost=4.69..178.73 rows=52 width=12) |
Recheck Cond: (project_id = 1018) |
-> Bitmap Index Scan on tbl_work_logs_project_id_idx (cost=0.00..4.68 rows=52 width=0) |
Index Cond: (project_id = 1018) |
SubPlan 1 |
-> Aggregate (cost=36.64..36.65 rows=1 width=32) |
-> Seq Scan on tbl_invoices i (cost=0.00..36.64 rows=1 width=6) |
Filter: (project_id = p.id) |