explain.depesz.com

PostgreSQL's explain analyze made readable

Result: uJtK

Settings
# exclusive inclusive rows x rows loops node
1. 11.223 905.917 ↓ 1.2 11 1

Limit (cost=15,540.19..15,540.44 rows=9 width=71) (actual time=894.691..905.917 rows=11 loops=1)

2. 0.033 894.694 ↓ 1.1 21 1

GroupAggregate (cost=15,539.91..15,540.44 rows=19 width=71) (actual time=894.665..894.694 rows=21 loops=1)

  • Group Key: m.movie_id, m.movie_title, m.movie_year, m.movie_country
3. 0.012 894.661 ↓ 1.3 24 1

Sort (cost=15,539.91..15,539.96 rows=19 width=71) (actual time=894.660..894.661 rows=24 loops=1)

  • Sort Key: m.movie_id, m.movie_title, m.movie_year, m.movie_country
  • Sort Method: quicksort Memory: 30kB
4. 0.030 894.649 ↓ 2.7 51 1

Sort (cost=15,539.27..15,539.32 rows=19 width=71) (actual time=894.646..894.649 rows=51 loops=1)

  • Sort Key: m.movie_id
  • Sort Method: quicksort Memory: 30kB
5. 0.024 894.619 ↓ 2.7 51 1

Hash Join (cost=15,350.93..15,538.87 rows=19 width=71) (actual time=890.691..894.619 rows=51 loops=1)

  • Hash Cond: (mg.genre_id = g.genre_id)
6. 0.000 894.571 ↓ 2.7 51 1

Nested Loop (cost=15,349.85..15,537.68 rows=19 width=43) (actual time=890.662..894.571 rows=51 loops=1)

7. 0.218 893.079 ↓ 2.9 538 1

Nested Loop (cost=15,349.43..15,453.42 rows=185 width=47) (actual time=890.418..893.079 rows=538 loops=1)

  • Join Filter: (m.movie_id = md.movie_id)
8. 0.000 890.709 ↓ 2.9 538 1

HashAggregate (cost=15,348.99..15,350.84 rows=185 width=8) (actual time=890.402..890.709 rows=538 loops=1)

  • Group Key: m2.movie_id
9. 80.735 901.158 ↓ 2.9 538 1

Gather (cost=1,000.86..15,348.53 rows=185 width=8) (actual time=1.125..901.158 rows=538 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
10. 3.267 820.423 ↓ 2.3 179 3

Nested Loop (cost=0.86..14,330.03 rows=77 width=8) (actual time=1.620..820.423 rows=179 loops=3)

11. 3.908 817.141 ↓ 2.3 179 3

Nested Loop (cost=0.42..14,228.57 rows=77 width=4) (actual time=1.536..817.141 rows=179 loops=3)

12. 813.213 813.213 ↓ 2.2 175 3

Parallel Seq Scan on director d (cost=0.00..13,267.02 rows=80 width=4) (actual time=1.479..813.213 rows=175 loops=3)

  • Filter: (((director_fname)::text ~~* 'joe'::text) OR ((director_lname)::text ~~* 'joe'::text))
  • Rows Removed by Filter: 333160
13. 0.020 0.020 ↑ 2.0 1 525

Index Scan using movie_director_director_id_index on movie_director md (cost=0.42..12.00 rows=2 width=8) (actual time=0.019..0.020 rows=1 loops=525)

  • Index Cond: (director_id = d.director_id)
14. 0.015 0.015 ↑ 1.0 1 538

Index Only Scan using movie_pkey on movie m2 (cost=0.43..1.32 rows=1 width=4) (actual time=0.015..0.015 rows=1 loops=538)

  • Index Cond: (movie_id = md.movie_id)
  • Heap Fetches: 538
15. 2.152 2.152 ↑ 1.0 1 538

Index Scan using movie_pkey on movie m (cost=0.43..0.54 rows=1 width=39) (actual time=0.004..0.004 rows=1 loops=538)

  • Index Cond: (movie_id = m2.movie_id)
  • Filter: ((movie_year >= 0) AND (movie_year <= 2020))
16. 1.614 1.614 ↓ 0.0 0 538

Index Scan using movie_genres_movie_id_index on movie_genres mg (cost=0.42..0.45 rows=1 width=8) (actual time=0.003..0.003 rows=0 loops=538)

  • Index Cond: (movie_id = m.movie_id)
17. 0.005 0.024 ↑ 1.0 3 1

Hash (cost=1.04..1.04 rows=3 width=36) (actual time=0.023..0.024 rows=3 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
18. 0.019 0.019 ↑ 1.0 3 1

Seq Scan on genres g (cost=0.00..1.04 rows=3 width=36) (actual time=0.017..0.019 rows=3 loops=1)

  • Filter: ((genre_name)::text ~~* '%'::text)