explain.depesz.com

PostgreSQL's explain analyze made readable

Result: R628

Settings
# exclusive inclusive rows x rows loops node
1. 0.431 49.932 ↑ 1.0 1 1

Aggregate (cost=268.59..268.60 rows=1 width=48) (actual time=49.932..49.932 rows=1 loops=1)

  • Buffers: shared hit=28322
2. 0.686 49.501 ↓ 1,620.0 1,620 1

Nested Loop (cost=5.27..268.58 rows=1 width=48) (actual time=0.463..49.501 rows=1,620 loops=1)

  • Join Filter: (ci.role_id = rt.id)
  • Buffers: shared hit=28322
3. 1.389 47.195 ↓ 1,620.0 1,620 1

Nested Loop (cost=5.27..267.42 rows=1 width=52) (actual time=0.461..47.195 rows=1,620 loops=1)

  • Join Filter: (pi.info_type_id = it3.id)
  • Rows Removed by Join Filter: 3270
  • Buffers: shared hit=26702
4. 2.804 11.576 ↓ 4,890.0 4,890 1

Nested Loop (cost=5.27..264.99 rows=1 width=56) (actual time=0.445..11.576 rows=4,890 loops=1)

  • Join Filter: (ci.person_id = n.id)
  • Buffers: shared hit=21812
5. 0.570 3.882 ↓ 4,890.0 4,890 1

Nested Loop (cost=4.84..262.79 rows=1 width=53) (actual time=0.440..3.882 rows=4,890 loops=1)

  • Buffers: shared hit=2252
6. 0.021 2.592 ↓ 30.0 30 1

Nested Loop (cost=4.41..243.11 rows=1 width=45) (actual time=0.435..2.592 rows=30 loops=1)

  • Join Filter: (mi.info_type_id = it.id)
  • Buffers: shared hit=1892
7. 0.011 2.361 ↓ 30.0 30 1

Nested Loop (cost=4.41..240.68 rows=1 width=49) (actual time=0.432..2.361 rows=30 loops=1)

  • Join Filter: (t.id = mi.movie_id)
  • Buffers: shared hit=1862
8. 0.000 0.835 ↓ 15.0 15 1

Nested Loop (cost=3.97..198.65 rows=1 width=65) (actual time=0.415..0.835 rows=15 loops=1)

  • Buffers: shared hit=1292
9. 0.015 0.718 ↓ 66.0 66 1

Nested Loop (cost=3.55..196.61 rows=1 width=69) (actual time=0.410..0.718 rows=66 loops=1)

  • Join Filter: (t.id = mc.movie_id)
  • Buffers: shared hit=1028
10. 0.008 0.682 ↓ 3.0 3 1

Nested Loop (cost=3.12..191.77 rows=1 width=61) (actual time=0.406..0.682 rows=3 loops=1)

  • Buffers: shared hit=1013
11. 0.052 0.542 ↓ 66.0 66 1

Nested Loop (cost=2.69..189.53 rows=1 width=49) (actual time=0.066..0.542 rows=66 loops=1)

  • Join Filter: (cc.status_id = cct2.id)
  • Buffers: shared hit=749
12. 0.006 0.490 ↓ 66.0 66 1

Nested Loop (cost=2.69..188.47 rows=1 width=53) (actual time=0.065..0.490 rows=66 loops=1)

  • Join Filter: (cc.subject_id = cct1.id)
  • Buffers: shared hit=683
13. 0.036 0.418 ↓ 66.0 66 1

Nested Loop (cost=2.69..187.40 rows=1 width=57) (actual time=0.062..0.418 rows=66 loops=1)

  • Join Filter: (t.id = cc.movie_id)
  • Buffers: shared hit=617
14. 0.016 0.316 ↓ 66.0 66 1

Nested Loop (cost=2.27..184.59 rows=1 width=45) (actual time=0.058..0.316 rows=66 loops=1)

  • Buffers: shared hit=353
15. 0.003 0.224 ↓ 38.0 38 1

Nested Loop (cost=1.85..183.31 rows=1 width=41) (actual time=0.046..0.224 rows=38 loops=1)

  • Join Filter: (t.id = ci.movie_id)
  • Buffers: shared hit=237
16. 0.004 0.075 ↑ 1.0 1 1

Nested Loop (cost=1.28..135.68 rows=1 width=25) (actual time=0.040..0.075 rows=1 loops=1)

  • Join Filter: (mk.keyword_id = k.id)
  • Rows Removed by Join Filter: 135
  • Buffers: shared hit=21
17. 0.014 0.014 ↑ 1.0 1 1

Index Scan using index_keyword_keyword on keyword k (cost=0.42..8.44 rows=1 width=4) (actual time=0.014..0.014 rows=1 loops=1)

  • Index Cond: (keyword = 'computer-animation'::text)
  • Buffers: shared hit=4
18. 0.019 0.057 ↓ 10.5 136 1

Nested Loop (cost=0.86..127.08 rows=13 width=29) (actual time=0.019..0.057 rows=136 loops=1)

  • Buffers: shared hit=17
19. 0.011 0.011 ↑ 2.3 3 1

Index Scan using index_title_title on title t (cost=0.43..58.99 rows=7 width=21) (actual time=0.008..0.011 rows=3 loops=1)

  • Index Cond: (title = 'Shrek 2'::text)
  • Filter: ((production_year >= 2000) AND (production_year <= 2010))
  • Buffers: shared hit=6
20. 0.027 0.027 ↑ 1.0 45 3

Index Scan using index_movie_keyword_movie_id on movie_keyword mk (cost=0.43..9.28 rows=45 width=8) (actual time=0.004..0.009 rows=45 loops=3)

  • Index Cond: (movie_id = t.id)
  • Buffers: shared hit=11
21. 0.146 0.146 ↓ 38.0 38 1

Index Scan using index_cast_info_movie_id on cast_info ci (cost=0.56..47.61 rows=1 width=16) (actual time=0.006..0.146 rows=38 loops=1)

  • Index Cond: (movie_id = mk.movie_id)
  • Filter: (note = ANY ('{(voice),"(voice) (uncredited)","(voice: English version)"}'::text[]))
  • Rows Removed by Filter: 191
  • Buffers: shared hit=216
22. 0.076 0.076 ↑ 1.0 2 38

Index Only Scan using index_aka_name_person_id on aka_name an (cost=0.42..1.27 rows=2 width=4) (actual time=0.002..0.002 rows=2 loops=38)

  • Index Cond: (person_id = ci.person_id)
  • Heap Fetches: 0
  • Buffers: shared hit=116
23. 0.066 0.066 ↑ 2.0 1 66

Index Scan using index_complete_cast_movie_id on complete_cast cc (cost=0.42..2.79 rows=2 width=12) (actual time=0.001..0.001 rows=1 loops=66)

  • Index Cond: (movie_id = mk.movie_id)
  • Buffers: shared hit=264
24. 0.066 0.066 ↑ 1.0 1 66

Seq Scan on comp_cast_type cct1 (cost=0.00..1.05 rows=1 width=4) (actual time=0.000..0.001 rows=1 loops=66)

  • Filter: ((kind)::text = 'cast'::text)
  • Rows Removed by Filter: 3
  • Buffers: shared hit=66
25. 0.000 0.000 ↑ 1.0 1 66

Seq Scan on comp_cast_type cct2 (cost=0.00..1.05 rows=1 width=4) (actual time=0.000..0.000 rows=1 loops=66)

  • Filter: ((kind)::text = 'complete+verified'::text)
  • Rows Removed by Filter: 3
  • Buffers: shared hit=66
26. 0.132 0.132 ↓ 0.0 0 66

Index Scan using index_char_name_id on char_name chn (cost=0.43..2.23 rows=1 width=20) (actual time=0.002..0.002 rows=0 loops=66)

  • Index Cond: (id = ci.person_role_id)
  • Filter: (name = 'Queen'::text)
  • Rows Removed by Filter: 1
  • Buffers: shared hit=264
27. 0.021 0.021 ↓ 4.4 22 3

Index Scan using index_movie_companies_movie_id on movie_companies mc (cost=0.43..4.78 rows=5 width=8) (actual time=0.003..0.007 rows=22 loops=3)

  • Index Cond: (movie_id = mk.movie_id)
  • Buffers: shared hit=15
28. 0.132 0.132 ↓ 0.0 0 66

Index Scan using index_company_name_id on company_name cn (cost=0.42..2.03 rows=1 width=4) (actual time=0.002..0.002 rows=0 loops=66)

  • Index Cond: (id = mc.company_id)
  • Filter: ((country_code)::text = '[us]'::text)
  • Rows Removed by Filter: 1
  • Buffers: shared hit=264
29. 1.515 1.515 ↓ 2.0 2 15

Index Scan using index_movie_info_movie_id on movie_info mi (cost=0.43..42.03 rows=1 width=8) (actual time=0.010..0.101 rows=2 loops=15)

  • Index Cond: (movie_id = mk.movie_id)
  • Filter: ((info IS NOT NULL) AND ((info ~~ 'Japan:%200%'::text) OR (info ~~ 'USA:%200%'::text)))
  • Rows Removed by Filter: 455
  • Buffers: shared hit=570
30. 0.210 0.210 ↑ 1.0 1 30

Seq Scan on info_type it (cost=0.00..2.41 rows=1 width=4) (actual time=0.002..0.007 rows=1 loops=30)

  • Filter: ((info)::text = 'release dates'::text)
  • Rows Removed by Filter: 112
  • Buffers: shared hit=30
31. 0.720 0.720 ↓ 6.5 163 30

Index Scan using index_person_info_person_id on person_info pi (cost=0.43..19.43 rows=25 width=8) (actual time=0.001..0.024 rows=163 loops=30)

  • Index Cond: (person_id = ci.person_id)
  • Buffers: shared hit=360
32. 4.890 4.890 ↑ 1.0 1 4,890

Index Scan using index_name_id on name n (cost=0.43..2.19 rows=1 width=19) (actual time=0.001..0.001 rows=1 loops=4,890)

  • Index Cond: (id = pi.person_id)
  • Filter: ((name ~~ '%An%'::text) AND ((gender)::text = 'f'::text))
  • Buffers: shared hit=19560
33. 34.230 34.230 ↑ 1.0 1 4,890

Seq Scan on info_type it3 (cost=0.00..2.41 rows=1 width=4) (actual time=0.002..0.007 rows=1 loops=4,890)

  • Filter: ((info)::text = 'trivia'::text)
  • Rows Removed by Filter: 112
  • Buffers: shared hit=4890
34. 1.620 1.620 ↑ 1.0 1 1,620

Seq Scan on role_type rt (cost=0.00..1.15 rows=1 width=4) (actual time=0.000..0.001 rows=1 loops=1,620)

  • Filter: ((role)::text = 'actress'::text)
  • Rows Removed by Filter: 11
  • Buffers: shared hit=1620