explain.depesz.com

PostgreSQL's explain analyze made readable

Result: MeU2

Settings
# exclusive inclusive rows x rows loops node
1. 0.005 1,923.532 ↓ 0.0 0 1

Sort (cost=243,826.84..243,909.77 rows=33,171 width=22) (actual time=1,923.532..1,923.532 rows=0 loops=1)

  • Sort Key: p.name
  • Sort Method: quicksort Memory: 25kB
2. 0.058 1,923.527 ↓ 0.0 0 1

Hash Join (cost=43,971.14..241,336.09 rows=33,171 width=22) (actual time=1,923.527..1,923.527 rows=0 loops=1)

  • Hash Cond: ((p.name_id)::text = (rn.name_id)::text)
3. 0.013 0.013 ↑ 9,121,149.0 1 1

Seq Scan on people p (cost=0.00..173,421.93 rows=9,121,149 width=24) (actual time=0.013..0.013 rows=1 loops=1)

  • Filter: (death_year IS NULL)
4. 0.000 1,923.456 ↓ 0.0 0 1

Hash (cost=43,548.75..43,548.75 rows=33,791 width=18) (actual time=1,923.456..1,923.456 rows=0 loops=1)

  • Buckets: 65536 Batches: 1 Memory Usage: 512kB
5. 0.002 1,923.456 ↓ 0.0 0 1

Subquery Scan on rn (cost=41,943.68..43,548.75 rows=33,791 width=18) (actual time=1,923.455..1,923.456 rows=0 loops=1)

6. 882.563 1,923.454 ↓ 0.0 0 1

Finalize HashAggregate (cost=41,943.68..43,210.84 rows=33,791 width=18) (actual time=1,923.454..1,923.454 rows=0 loops=1)

  • Group Key: pt.name_id
  • Filter: (count(*) > 10)
  • Rows Removed by Filter: 1346101
7. 249.121 1,040.891 ↓ 21.5 1,814,469 1

Gather (cost=32,439.90..41,310.09 rows=84,478 width=18) (actual time=654.380..1,040.891 rows=1,814,469 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
8. 424.829 791.770 ↓ 14.3 604,823 3

Partial HashAggregate (cost=31,439.90..31,862.29 rows=42,239 width=18) (actual time=651.772..791.770 rows=604,823 loops=3)

  • Group Key: pt.name_id
9. 290.054 366.941 ↓ 17.5 739,585 3

Nested Loop (cost=8,800.50..31,228.71 rows=42,239 width=10) (actual time=19.425..366.941 rows=739,585 loops=3)

  • Join Filter: ((r.title_id)::text = (pt.title_id)::text)
10. 42.958 76.870 ↓ 4.5 11,786 3

Parallel Hash Join (cost=8,799.94..21,800.28 rows=2,613 width=20) (actual time=19.387..76.870 rows=11,786 loops=3)

  • Hash Cond: ((t.title_id)::text = (r.title_id)::text)
11. 14.830 14.830 ↑ 1.2 172,140 3

Parallel Index Only Scan using titles_movies_partial_idx on titles t (cost=0.42..12,447.27 rows=210,857 width=10) (actual time=0.041..14.830 rows=172,140 loops=3)

  • Heap Fetches: 0
12. 5.448 19.082 ↑ 1.3 23,598 3

Parallel Hash (cost=8,423.44..8,423.44 rows=30,086 width=10) (actual time=19.082..19.082 rows=23,598 loops=3)

  • Buckets: 131072 Batches: 1 Memory Usage: 4416kB
13. 6.323 13.634 ↑ 1.3 23,598 3

Parallel Bitmap Heap Scan on ratings r (cost=2,055.15..8,423.44 rows=30,086 width=10) (actual time=6.308..13.634 rows=23,598 loops=3)

  • Recheck Cond: ((votes > 500) AND (rating > '5'::numeric))
  • Heap Blocks: exact=1771
14. 7.311 7.311 ↑ 1.0 70,794 1

Bitmap Index Scan on ratings_votes_rating_idx (cost=0.00..2,037.10 rows=72,207 width=0) (actual time=7.311..7.311 rows=70,794 loops=1)

  • Index Cond: ((votes > 500) AND (rating > '5'::numeric))
15. 0.017 0.017 ↑ 1.3 63 35,358

Index Only Scan using people_titles_title_id on people_titles pt (cost=0.56..2.58 rows=82 width=20) (actual time=0.010..0.017 rows=63 loops=35,358)

  • Index Cond: (title_id = (t.title_id)::text)
  • Heap Fetches: 0
Planning time : 0.773 ms
Execution time : 1,935.723 ms