| GroupAggregate (cost=8.91..83.91 rows=1 width=477) |
| Group Key: p.id |
| -> Nested Loop Left Join (cost=8.91..40.21 rows=1 width=365) |
| Join Filter: (sl.project_id = p.id) |
| -> Nested Loop Left Join (cost=4.59..24.24 rows=1 width=357) |
| 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=349) |
| Index Cond: (id = 4173) |
| -> Bitmap Heap Scan on tbl_work_logs arrive (cost=4.31..15.93 rows=1 width=12) |
| Recheck Cond: (project_id = 4173) |
| 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.31 rows=3 width=0) |
| Index Cond: (project_id = 4173) |
| -> Bitmap Heap Scan on tbl_work_logs sl (cost=4.31..15.93 rows=3 width=12) |
| Recheck Cond: (project_id = 4173) |
| -> Bitmap Index Scan on tbl_work_logs_project_id_idx (cost=0.00..4.31 rows=3 width=0) |
| Index Cond: (project_id = 4173) |
| SubPlan 1 |
| -> Aggregate (cost=43.63..43.64 rows=1 width=32) |
| -> Seq Scan on tbl_invoices i (cost=0.00..43.62 rows=1 width=6) |
| Filter: (project_id = p.id) |