| Aggregate (cost=284.30..284.31 rows=1 width=720) |
| -> Nested Loop Left Join (cost=240.40..277.66 rows=22 width=11) |
| -> Nested Loop Left Join (cost=240.12..265.55 rows=22 width=13) |
| -> Hash Join (cost=239.84..253.44 rows=22 width=13) |
| Hash Cond: (subpsl.project_id = p.id) |
| -> HashAggregate (cost=91.42..97.43 rows=601 width=12) |
| Group Key: subpsl.project_id |
| Filter: ((min(subpsl.id) IS NOT NULL) AND (max(subpsl.id) IS NOT NULL)) |
| -> Seq Scan on tbl_project_status_logs subpsl (cost=0.00..82.79 rows=690 width=8) |
| Filter: ((created_at >= '2025-01-01 00:00:00+08'::timestamp with time zone) AND (created_at < '2026-01-01 00:00:00'::timestamp without time zone)) |
| -> Hash (cost=147.02..147.02 rows=112 width=9) |
| -> Bitmap Heap Scan on tbl_projects p (cost=5.15..147.02 rows=112 width=9) |
| Recheck Cond: (created_by = 1001) |
| -> Bitmap Index Scan on tbl_projects_created_by_idx (cost=0.00..5.12 rows=112 width=0) |
| Index Cond: (created_by = 1001) |
| -> Index Scan using tbl_project_status_logs_pkey on tbl_project_status_logs minpsl (cost=0.28..0.55 rows=1 width=8) |
| Index Cond: ((min(subpsl.id)) = id) |
| -> Index Scan using tbl_project_status_logs_pkey on tbl_project_status_logs maxpsl (cost=0.28..0.55 rows=1 width=6) |
| Index Cond: ((max(subpsl.id)) = id) |