explain.depesz.com

PostgreSQL's explain analyze made readable

Result: xFin : Optimization for: plan #shx6

Settings

Optimization path:

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 0.003 25,115.228 ↑ 1.0 1 1

Limit (cost=2.11..2.14 rows=1 width=15) (actual time=25,115.226..25,115.228 rows=1 loops=1)

2. 0.002 25,115.225 ↑ 2,928,717.0 1 1

Nested Loop (cost=2.11..89,410.15 rows=2,928,717 width=15) (actual time=25,115.225..25,115.225 rows=1 loops=1)

3. 71.808 25,115.209 ↑ 87.0 1 1

Nested Loop Anti Join (cost=2.11..46,316.93 rows=87 width=15) (actual time=25,115.209..25,115.209 rows=1 loops=1)

  • Join Filter: (_tmp_wikidata_persons_check.id = persons_external.person_id)
  • Rows Removed by Join Filter: 152,554
4. 57.794 24,972.061 ↓ 3.7 348 1

Nested Loop Semi Join (cost=2.11..43,231.48 rows=94 width=15) (actual time=20.084..24,972.061 rows=348 loops=1)

5. 20.075 20.075 ↑ 1.2 15,836 1

Seq Scan on persons_external (cost=0.00..1,441.60 rows=18,828 width=15) (actual time=2.402..20.075 rows=15,836 loops=1)

  • Filter: ((source)::text = 'imdb'::text)
  • Rows Removed by Filter: 55,166
6. 174.196 24,894.192 ↓ 0.0 0 15,836

Bitmap Heap Scan on movies movies_1 (cost=2.11..8.04 rows=56 width=28) (actual time=1.572..1.572 rows=0 loops=15,836)

  • Recheck Cond: (actors @> ARRAY[persons_external.person_id])
  • Filter: ((("IMDB" IS NULL) OR (("IMDB")::text = ''::text)) AND (countrys @> '{1}'::integer[]))
  • Rows Removed by Filter: 4
  • Heap Blocks: exact=78,094
7. 24,719.996 24,719.996 ↑ 46.0 6 15,836

Bitmap Index Scan on movies_k_actors (cost=0.00..2.10 rows=276 width=0) (actual time=1.561..1.561 rows=6 loops=15,836)

  • Index Cond: (actors @> ARRAY[persons_external.person_id])
8. 70.217 71.340 ↑ 4.9 439 348

Materialize (cost=0.00..42.43 rows=2,162 width=4) (actual time=0.001..0.205 rows=439 loops=348)

9. 1.123 1.123 ↓ 1.0 2,189 1

Seq Scan on _tmp_wikidata_persons_check (cost=0.00..31.62 rows=2,162 width=4) (actual time=0.014..1.123 rows=2,189 loops=1)

10. 0.005 0.014 ↑ 33,564.0 1 1

Materialize (cost=0.00..6,676.28 rows=33,564 width=0) (actual time=0.013..0.014 rows=1 loops=1)

11. 0.009 0.009 ↑ 33,564.0 1 1

Seq Scan on movies (cost=0.00..6,508.46 rows=33,564 width=0) (actual time=0.008..0.009 rows=1 loops=1)

  • Filter: (("IMDB" IS NULL) OR (("IMDB")::text = ''::text))
  • Rows Removed by Filter: 2
Planning time : 0.343 ms
Execution time : 25,115.293 ms