explain.depesz.com

PostgreSQL's explain analyze made readable

Result: ySyA

Settings
# exclusive inclusive rows x rows loops node
1. 110.693 5,383.322 ↑ 1.0 1 1

Aggregate (cost=5,385.08..5,385.09 rows=1 width=32) (actual time=5,383.321..5,383.322 rows=1 loops=1)

2. 48.030 5,272.629 ↓ 11,796.0 11,796 1

Nested Loop (cost=5,292.24..5,385.08 rows=1 width=310) (actual time=3,439.528..5,272.629 rows=11,796 loops=1)

3. 1,032.937 4,616.745 ↓ 4,250.7 46,758 1

GroupAggregate (cost=5,291.82..5,292.13 rows=11 width=48) (actual time=3,436.882..4,616.745 rows=46,758 loops=1)

  • Group Key: t.example_id
4. 469.670 3,583.808 ↓ 32,334.9 355,684 1

Sort (cost=5,291.82..5,291.85 rows=11 width=112) (actual time=3,436.812..3,583.808 rows=355,684 loops=1)

  • Sort Key: t.example_id
  • Sort Method: external merge Disk: 28744kB
5. 285.983 3,114.138 ↓ 32,334.9 355,684 1

Nested Loop (cost=5,261.94..5,291.63 rows=11 width=112) (actual time=514.024..3,114.138 rows=355,684 loops=1)

6. 180.181 694.051 ↓ 32,334.9 355,684 1

Hash Right Join (cost=5,261.52..5,286.15 rows=11 width=48) (actual time=514.007..694.051 rows=355,684 loops=1)

  • Hash Cond: (annotations_taggedtokenreview.tagged_token_id = annotations_taggedtoken.id)
  • Filter: (annotations_taggedtokenreview.correct IS NULL)
  • Rows Removed by Filter: 40
7. 0.016 0.016 ↑ 26.5 40 1

Seq Scan on annotations_taggedtokenreview (cost=0.00..20.60 rows=1,060 width=17) (actual time=0.006..0.016 rows=40 loops=1)

8. 152.225 513.854 ↓ 158.9 355,724 1

Hash (cost=5,233.53..5,233.53 rows=2,239 width=48) (actual time=513.854..513.854 rows=355,724 loops=1)

  • Buckets: 65536 (originally 4096) Batches: 8 (originally 1) Memory Usage: 3964kB
9. 154.489 361.629 ↓ 158.9 355,724 1

Nested Loop (cost=55.66..5,233.53 rows=2,239 width=48) (actual time=2.543..361.629 rows=355,724 loops=1)

10. 0.037 0.037 ↓ 13.0 13 1

Index Scan using annotations_tag_schema_id_3a781200 on annotations_tag a (cost=0.14..8.16 rows=1 width=16) (actual time=0.009..0.037 rows=13 loops=1)

  • Index Cond: (schema_id = '021e5e8a-7fde-4626-a634-2b0e755f80e5'::uuid)
11. 184.080 207.103 ↓ 11.1 27,363 13

Bitmap Heap Scan on annotations_taggedtoken (cost=55.51..5,200.74 rows=2,463 width=48) (actual time=2.510..15.931 rows=27,363 loops=13)

  • Recheck Cond: (tag_id = a.id)
  • Heap Blocks: exact=75152
12. 23.023 23.023 ↓ 11.1 27,382 13

Bitmap Index Scan on annotations_taggedtoken_tag_id_433afbe9 (cost=0.00..54.89 rows=2,463 width=0) (actual time=1.771..1.771 rows=27,382 loops=13)

  • Index Cond: (tag_id = a.id)
13. 2,134.104 2,134.104 ↑ 1.0 1 355,684

Index Scan using annotations_token_pkey on annotations_token t (cost=0.42..0.50 rows=1 width=96) (actual time=0.006..0.006 rows=1 loops=355,684)

  • Index Cond: (id = annotations_taggedtoken.token_id)
14. 607.854 607.854 ↓ 0.0 0 46,758

Index Scan using annotations_example_pkey on annotations_example examples (cost=0.42..8.44 rows=1 width=278) (actual time=0.013..0.013 rows=0 loops=46,758)

  • Index Cond: (id = t.example_id)
  • Filter: (dataset_id = 'fdd1926d-9081-4300-8b04-153dfcdb6f7b'::uuid)