explain.depesz.com

PostgreSQL's explain analyze made readable

Result: yTKj

Settings
# exclusive inclusive rows x rows loops node
1. 0.090 2,174.524 ↓ 10.0 10 1

Limit (cost=12,297.15..12,297.15 rows=1 width=16) (actual time=2,174.390..2,174.524 rows=10 loops=1)

2. 0.029 2,174.434 ↓ 10.0 10 1

Unique (cost=12,297.15..12,297.15 rows=1 width=16) (actual time=2,174.389..2,174.434 rows=10 loops=1)

3. 109.269 2,174.405 ↓ 86.0 86 1

Sort (cost=12,297.15..12,297.15 rows=1 width=16) (actual time=2,174.387..2,174.405 rows=86 loops=1)

  • Sort Key: e.id
  • Sort Method: external merge Disk: 2616kB
4. 203.158 2,065.136 ↓ 102,410.0 102,410 1

Gather (cost=12,280.35..12,297.14 rows=1 width=16) (actual time=208.186..2,065.136 rows=102,410 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
5. 741.843 1,861.978 ↓ 34,137.0 34,137 3

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

6. 798.815 1,120.130 ↓ 23,115.8 138,695 3

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

7. 48.071 321.310 ↓ 23,115.8 138,695 3

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

  • Merge Cond: (at2.id = annotations_taggedtokenreview.tagged_token_id)
  • Filter: (annotations_taggedtokenreview.correct IS NULL)
8. 188.197 273.210 ↓ 119.2 138,695 3

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

  • Sort Key: at2.id
  • Sort Method: external merge Disk: 4856kB
  • Worker 0: Sort Method: external merge Disk: 4856kB
  • Worker 1: Sort Method: external merge Disk: 7440kB
9. 61.745 85.013 ↓ 119.2 138,695 3

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

  • Hash Cond: (at2.tag_id = at3.id)
10. 23.246 23.246 ↑ 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.007..23.246 rows=139,687 loops=3)

11. 0.009 0.022 ↓ 6.5 13 3

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

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
12. 0.006 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.010..0.013 rows=13 loops=3)

  • Recheck Cond: (schema_id = '021e5e8a-7fde-4626-a634-2b0e755f80e5'::uuid)
  • Heap Blocks: exact=1
13. 0.007 0.007 ↓ 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.007..0.007 rows=13 loops=3)

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

Sort (cost=73.86..76.51 rows=1,060 width=17) (actual time=0.029..0.029 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
15. 0.018 0.018 ↓ 0.0 0 3

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

16. 0.005 0.005 ↑ 1.0 1 416,085

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

  • Index Cond: (id = at2.token_id)
17. 0.005 0.005 ↓ 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.005..0.005 rows=0 loops=416,085)

  • Index Cond: (id = annotations_token.example_id)
  • Filter: (dataset_id = 'fdd1926d-9081-4300-8b04-153dfcdb6f7b'::uuid)
  • Rows Removed by Filter: 1