explain.depesz.com

PostgreSQL's explain analyze made readable

Result: WF9P

Settings
# exclusive inclusive rows x rows loops node
1. 95.316 3,623.156 ↑ 1.0 1 1

Aggregate (cost=5,305.78..5,305.79 rows=1 width=32) (actual time=3,623.156..3,623.156 rows=1 loops=1)

2. 18.078 3,527.840 ↓ 11,796.0 11,796 1

Nested Loop (cost=5,297.72..5,305.77 rows=1 width=310) (actual time=3,159.225..3,527.840 rows=11,796 loops=1)

3. 290.027 3,486.170 ↓ 11,796.0 11,796 1

GroupAggregate (cost=5,297.30..5,297.33 rows=1 width=48) (actual time=3,159.208..3,486.170 rows=11,796 loops=1)

  • Group Key: t.example_id
4. 132.099 3,196.143 ↓ 102,408.0 102,408 1

Sort (cost=5,297.30..5,297.30 rows=1 width=112) (actual time=3,159.136..3,196.143 rows=102,408 loops=1)

  • Sort Key: t.example_id
  • Sort Method: external merge Disk: 8072kB
5. 59.807 3,064.044 ↓ 102,408.0 102,408 1

Nested Loop (cost=5,262.36..5,297.29 rows=1 width=112) (actual time=518.567..3,064.044 rows=102,408 loops=1)

6. 169.367 1,937.185 ↓ 32,334.9 355,684 1

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

7. 182.498 700.766 ↓ 32,334.9 355,684 1

Hash Right Join (cost=5,261.52..5,286.15 rows=11 width=48) (actual time=518.417..700.766 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
8. 0.045 0.045 ↑ 26.5 40 1

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

9. 151.997 518.223 ↓ 158.9 355,724 1

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

  • Buckets: 65536 (originally 4096) Batches: 8 (originally 1) Memory Usage: 3964kB
10. 157.341 366.226 ↓ 158.9 355,724 1

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

11. 0.040 0.040 ↓ 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.013..0.040 rows=13 loops=1)

  • Index Cond: (schema_id = '021e5e8a-7fde-4626-a634-2b0e755f80e5'::uuid)
12. 185.575 208.845 ↓ 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.525..16.065 rows=27,363 loops=13)

  • Recheck Cond: (tag_id = a.id)
  • Heap Blocks: exact=75152
13. 23.270 23.270 ↓ 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.790..1.790 rows=27,382 loops=13)

  • Index Cond: (tag_id = a.id)
14. 1,067.052 1,067.052 ↑ 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.003..0.003 rows=1 loops=355,684)

  • Index Cond: (id = annotations_taggedtoken.token_id)
15. 1,067.052 1,067.052 ↓ 0.0 0 355,684

Index Scan using annotations_example_pkey on annotations_example e (cost=0.42..0.51 rows=1 width=16) (actual time=0.003..0.003 rows=0 loops=355,684)

  • Index Cond: (id = t.example_id)
  • Filter: (dataset_id = 'fdd1926d-9081-4300-8b04-153dfcdb6f7b'::uuid)
  • Rows Removed by Filter: 1
16. 23.592 23.592 ↑ 1.0 1 11,796

Index Scan using annotations_example_pkey on annotations_example examples (cost=0.42..8.44 rows=1 width=278) (actual time=0.002..0.002 rows=1 loops=11,796)

  • Index Cond: (id = t.example_id)