| Sort (cost=101.89..101.89 rows=1 width=191) |
| Sort Key: s.status, s.target_completed_at, s.created_at DESC |
| InitPlan 1 (returns $0) |
| -> Aggregate (cost=47.84..47.84 rows=1 width=32) |
| -> Seq Scan on tbl_tasks s_1 (cost=0.00..47.73 rows=43 width=13) |
| Filter: ((tree_path IS NOT NULL) AND (head_of = 1001)) |
| -> Group (cost=54.02..54.03 rows=1 width=191) |
| Group Key: s.id |
| -> Sort (cost=54.02..54.03 rows=1 width=191) |
| Sort Key: s.id |
| -> Seq Scan on tbl_tasks s (cost=0.00..54.02 rows=1 width=191) |
| Filter: ((tree_path @> $0) AND (head_of = 1001) AND (parent_id = 1658)) |