explain.depesz.com

PostgreSQL's explain analyze made readable

Result: lKD7

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 0.000 ↓ 0.0

Limit (cost=3,870,838.47..3,870,838.47 rows=1 width=86) (actual rows= loops=)

2. 0.000 0.000 ↓ 0.0

Sort (cost=3,870,838.47..3,870,844.44 rows=2,388 width=86) (actual rows= loops=)

  • Sort Key: (count(annotations_task.id) FILTER (WHERE ((annotations_task.status)::text = 'done'::text))) DESC, annotations_task.status
3. 0.000 0.000 ↓ 0.0

Finalize GroupAggregate (cost=3,870,598.93..3,870,826.53 rows=2,388 width=86) (actual rows= loops=)

  • Group Key: annotations_taskset.id, annotations_task.status
4. 0.000 0.000 ↓ 0.0

Gather Merge (cost=3,870,598.93..3,870,788.60 rows=1,405 width=78) (actual rows= loops=)

  • Workers Planned: 1
5. 0.000 0.000 ↓ 0.0

Partial GroupAggregate (cost=3,869,598.92..3,869,630.53 rows=1,405 width=78) (actual rows= loops=)

  • Group Key: annotations_taskset.id, annotations_task.status
6. 0.000 0.000 ↓ 0.0

Sort (cost=3,869,598.92..3,869,602.43 rows=1,405 width=86) (actual rows= loops=)

  • Sort Key: annotations_taskset.id, annotations_task.status
7. 0.000 0.000 ↓ 0.0

Parallel Hash Left Join (cost=7,152.97..3,869,525.46 rows=1,405 width=86) (actual rows= loops=)

  • Hash Cond: (annotations_taskset.id = annotations_task.taskset_id)
8. 0.000 0.000 ↓ 0.0

Parallel Bitmap Heap Scan on annotations_taskset (cost=3,810.95..3,865,588.27 rows=1,405 width=65) (actual rows= loops=)

  • Recheck Cond: (definition_id = '8b0b136b-a52e-4025-830d-95167740e582'::uuid)
  • Filter: ((NOT fully_annotated) AND ((NOT (SubPlan 1)) OR (NOT (hashed SubPlan 2))))
9. 0.000 0.000 ↓ 0.0

BitmapAnd (cost=2,105.24..2,105.24 rows=3,184 width=0) (actual rows= loops=)

10. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on annotations_taskset_definition_id_bb851df5 (cost=0.00..159.14 rows=5,163 width=0) (actual rows= loops=)

  • Index Cond: (definition_id = '8b0b136b-a52e-4025-830d-95167740e582'::uuid)
11. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on annotations_taskset_fully_annotated_037d23f1 (cost=0.00..1,944.65 rows=81,631 width=0) (actual rows= loops=)

  • Index Cond: (fully_annotated = false)
12.          

SubPlan (forParallel Bitmap Heap Scan)

13. 0.000 0.000 ↓ 0.0

Materialize (cost=0.00..3,842.96 rows=111,590 width=16) (actual rows= loops=)

14. 0.000 0.000 ↓ 0.0

Seq Scan on annotations_task u1 (cost=0.00..2,740.01 rows=111,590 width=16) (actual rows= loops=)

  • Filter: ((status)::text = 'done'::text)
15. 0.000 0.000 ↓ 0.0

Bitmap Heap Scan on annotations_task u1_1 (cost=255.20..1,685.46 rows=8,101 width=16) (actual rows= loops=)

  • Recheck Cond: (annotator_id = 24)
16. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on annotations_task_annotator_id_255473fd (cost=0.00..253.17 rows=8,101 width=0) (actual rows= loops=)

  • Index Cond: (annotator_id = 24)
17. 0.000 0.000 ↓ 0.0

Parallel Hash (cost=1,993.01..1,993.01 rows=66,401 width=37) (actual rows= loops=)

18. 0.000 0.000 ↓ 0.0

Parallel Seq Scan on annotations_task (cost=0.00..1,993.01 rows=66,401 width=37) (actual rows= loops=)