explain.depesz.com

PostgreSQL's explain analyze made readable

Result: oK8v

Settings
# exclusive inclusive rows x rows loops node
1. 0.562 517.847 ↑ 1.0 1 1

Aggregate (cost=5,305.82..5,305.83 rows=1 width=32) (actual time=517.847..517.847 rows=1 loops=1)

2. 0.086 517.285 ↓ 100.0 100 1

Nested Loop (cost=5,297.73..5,305.81 rows=1 width=310) (actual time=516.665..517.285 rows=100 loops=1)

3. 0.337 516.999 ↓ 100.0 100 1

GroupAggregate (cost=5,297.31..5,297.34 rows=1 width=48) (actual time=516.658..516.999 rows=100 loops=1)

  • Group Key: relevant_tagged_tokens.example_id
4. 0.094 516.662 ↓ 100.0 100 1

Sort (cost=5,297.31..5,297.32 rows=1 width=120) (actual time=516.638..516.662 rows=100 loops=1)

  • Sort Key: relevant_tagged_tokens.example_id
  • Sort Method: quicksort Memory: 39kB
5. 0.075 516.568 ↓ 100.0 100 1

Subquery Scan on relevant_tagged_tokens (cost=5,262.36..5,297.30 rows=1 width=120) (actual time=513.757..516.568 rows=100 loops=1)

6. 0.050 516.493 ↓ 100.0 100 1

Limit (cost=5,262.36..5,297.29 rows=1 width=88) (actual time=513.749..516.493 rows=100 loops=1)

7. 0.289 516.443 ↓ 100.0 100 1

Nested Loop (cost=5,262.36..5,297.29 rows=1 width=88) (actual time=513.748..516.443 rows=100 loops=1)

8. 0.290 515.098 ↓ 32.0 352 1

Nested Loop (cost=5,261.94..5,291.63 rows=11 width=112) (actual time=513.625..515.098 rows=352 loops=1)

9. 0.271 513.752 ↓ 32.0 352 1

Hash Right Join (cost=5,261.52..5,286.15 rows=11 width=48) (actual time=513.609..513.752 rows=352 loops=1)

  • Hash Cond: (annotations_taggedtokenreview.tagged_token_id = annotations_taggedtoken.id)
  • Filter: (annotations_taggedtokenreview.correct IS NULL)
  • Rows Removed by Filter: 3
10. 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)

11. 151.565 513.465 ↓ 158.9 355,724 1

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

  • Buckets: 65536 (originally 4096) Batches: 8 (originally 1) Memory Usage: 3964kB
12. 153.303 361.900 ↓ 158.9 355,724 1

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

13. 0.038 0.038 ↓ 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.012..0.038 rows=13 loops=1)

  • Index Cond: (schema_id = '021e5e8a-7fde-4626-a634-2b0e755f80e5'::uuid)
14. 185.679 208.559 ↓ 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.542..16.043 rows=27,363 loops=13)

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

  • Index Cond: (tag_id = a.id)
16. 1.056 1.056 ↑ 1.0 1 352

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=352)

  • Index Cond: (id = annotations_taggedtoken.token_id)
17. 1.056 1.056 ↓ 0.0 0 352

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=352)

  • Index Cond: (id = t.example_id)
  • Filter: (dataset_id = 'fdd1926d-9081-4300-8b04-153dfcdb6f7b'::uuid)
  • Rows Removed by Filter: 1
18. 0.200 0.200 ↑ 1.0 1 100

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=100)

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