explain.depesz.com

PostgreSQL's explain analyze made readable

Result: EKSu

Settings
# exclusive inclusive rows x rows loops node
1. 0.035 1,731.091 ↓ 90.0 90 1

Nested Loop Left Join (cost=12,415.83..12,424.45 rows=1 width=114) (actual time=1,730.009..1,731.091 rows=90 loops=1)

2. 0.083 1,729.896 ↓ 10.0 10 1

Limit (cost=12,297.15..12,297.15 rows=1 width=16) (actual time=1,729.788..1,729.896 rows=10 loops=1)

3. 0.012 1,729.813 ↓ 10.0 10 1

Unique (cost=12,297.15..12,297.15 rows=1 width=16) (actual time=1,729.787..1,729.813 rows=10 loops=1)

4. 76.135 1,729.801 ↓ 86.0 86 1

Sort (cost=12,297.15..12,297.15 rows=1 width=16) (actual time=1,729.785..1,729.801 rows=86 loops=1)

  • Sort Key: e.id
  • Sort Method: external merge Disk: 2616kB
5. 119.931 1,653.666 ↓ 102,410.0 102,410 1

Gather (cost=12,280.35..12,297.14 rows=1 width=16) (actual time=180.198..1,653.666 rows=102,410 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
6. 629.902 1,533.735 ↓ 34,137.0 34,137 3

Nested Loop (cost=11,280.35..11,297.04 rows=1 width=16) (actual time=172.295..1,533.735 rows=34,137 loops=3)

7. 654.730 903.829 ↓ 23,115.8 138,695 3

Nested Loop (cost=11,279.93..11,293.79 rows=6 width=16) (actual time=172.243..903.829 rows=138,695 loops=3)

8. 32.230 249.095 ↓ 23,115.8 138,695 3

Merge Left Join (cost=11,279.51..11,290.66 rows=6 width=16) (actual time=172.220..249.095 rows=138,695 loops=3)

  • Merge Cond: (at2.id = annotations_taggedtokenreview.tagged_token_id)
  • Filter: (annotations_taggedtokenreview.correct IS NULL)
9. 144.384 216.845 ↓ 119.2 138,695 3

Sort (cost=11,205.64..11,208.55 rows=1,164 width=32) (actual time=172.194..216.845 rows=138,695 loops=3)

  • Sort Key: at2.id
  • Sort Method: external merge Disk: 5688kB
  • Worker 0: Sort Method: external merge Disk: 5016kB
  • Worker 1: Sort Method: external merge Disk: 6448kB
10. 49.177 72.461 ↓ 119.2 138,695 3

Hash Join (cost=9.53..11,146.37 rows=1,164 width=32) (actual time=0.069..72.461 rows=138,695 loops=3)

  • Hash Cond: (at2.tag_id = at3.id)
11. 23.264 23.264 ↑ 1.2 139,687 3

Parallel Seq Scan on annotations_taggedtoken at2 (cost=0.00..10,672.03 rows=174,603 width=48) (actual time=0.005..23.264 rows=139,687 loops=3)

12. 0.007 0.020 ↓ 6.5 13 3

Hash (cost=9.50..9.50 rows=2 width=16) (actual time=0.020..0.020 rows=13 loops=3)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
13. 0.005 0.013 ↓ 6.5 13 3

Bitmap Heap Scan on annotations_tag at3 (cost=4.16..9.50 rows=2 width=16) (actual time=0.011..0.013 rows=13 loops=3)

  • Recheck Cond: (schema_id = '021e5e8a-7fde-4626-a634-2b0e755f80e5'::uuid)
  • Heap Blocks: exact=1
14. 0.008 0.008 ↓ 6.5 13 3

Bitmap Index Scan on annotations_tag_schema_id_name_98abe476_uniq (cost=0.00..4.16 rows=2 width=0) (actual time=0.008..0.008 rows=13 loops=3)

  • Index Cond: (schema_id = '021e5e8a-7fde-4626-a634-2b0e755f80e5'::uuid)
15. 0.008 0.020 ↓ 0.0 0 3

Sort (cost=73.86..76.51 rows=1,060 width=17) (actual time=0.020..0.020 rows=0 loops=3)

  • Sort Key: annotations_taggedtokenreview.tagged_token_id
  • Sort Method: quicksort Memory: 25kB
  • Worker 0: Sort Method: quicksort Memory: 25kB
  • Worker 1: Sort Method: quicksort Memory: 25kB
16. 0.012 0.012 ↓ 0.0 0 3

Seq Scan on annotations_taggedtokenreview (cost=0.00..20.60 rows=1,060 width=17) (actual time=0.012..0.012 rows=0 loops=3)

17. 0.004 0.004 ↑ 1.0 1 416,085

Index Scan using annotations_token_pkey on annotations_token annotations_token_1 (cost=0.42..0.52 rows=1 width=32) (actual time=0.004..0.004 rows=1 loops=416,085)

  • Index Cond: (id = at2.token_id)
18. 0.004 0.004 ↓ 0.0 0 416,085

Index Scan using annotations_example_pkey on annotations_example e (cost=0.42..0.54 rows=1 width=16) (actual time=0.004..0.004 rows=0 loops=416,085)

  • Index Cond: (id = annotations_token_1.example_id)
  • Filter: (dataset_id = 'fdd1926d-9081-4300-8b04-153dfcdb6f7b'::uuid)
  • Rows Removed by Filter: 1
19. 0.910 1.160 ↓ 9.0 9 10

Merge Left Join (cost=118.69..127.27 rows=1 width=104) (actual time=0.084..0.116 rows=9 loops=10)

  • Merge Cond: (annotations_token.example_id = relevant_tokens_with_maximal_bounding_span.example_id)
  • Join Filter: (annotations_token.span && (int4range(relevant_tokens_with_maximal_bounding_span.l, max(upper(relevant_tokens_with_maximal_bounding_span.span)))))
  • Rows Removed by Join Filter: 31
20. 0.060 0.250 ↓ 9.0 9 10

Nested Loop (cost=0.84..9.01 rows=1 width=72) (actual time=0.010..0.025 rows=9 loops=10)

21. 0.050 0.050 ↓ 7.0 7 10

Index Scan using annotations_token_example_id_b18e09bd on annotations_token (cost=0.42..8.44 rows=1 width=56) (actual time=0.004..0.005 rows=7 loops=10)

  • Index Cond: ((example_id = e.id) AND (example_id = e.id))
22. 0.140 0.140 ↑ 1.0 1 70

Index Scan using annotations_taggedtoken_token_id_605226ab on annotations_taggedtoken (cost=0.42..0.56 rows=1 width=48) (actual time=0.002..0.002 rows=1 loops=70)

  • Index Cond: (token_id = annotations_token.id)