explain.depesz.com

PostgreSQL's explain analyze made readable

Result: bSe2

Settings
# exclusive inclusive rows x rows loops node
1. 0.011 1,621.821 ↓ 0.0 0 1

Sort (cost=240,174.00..240,256.92 rows=33,171 width=22) (actual time=1,621.821..1,621.821 rows=0 loops=1)

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

Hash Join (cost=40,318.29..237,683.25 rows=33,171 width=22) (actual time=1,621.809..1,621.810 rows=0 loops=1)

  • Hash Cond: ((p.name_id)::text = (rn.name_id)::text)
3. 0.011 0.011 ↑ 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.011..0.011 rows=1 loops=1)

  • Filter: (death_year IS NULL)
4. 0.001 1,621.741 ↓ 0.0 0 1

Hash (cost=39,895.90..39,895.90 rows=33,791 width=18) (actual time=1,621.741..1,621.741 rows=0 loops=1)

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

Subquery Scan on rn (cost=38,290.83..39,895.90 rows=33,791 width=18) (actual time=1,621.740..1,621.740 rows=0 loops=1)

6. 1,280.718 1,621.740 ↓ 0.0 0 1

HashAggregate (cost=38,290.83..39,557.99 rows=33,791 width=18) (actual time=1,621.740..1,621.740 rows=0 loops=1)

  • Group Key: pt.name_id
  • Filter: (count(*) > 10)
  • Rows Removed by Filter: 1346101
7. 101.558 341.022 ↓ 21.9 2,218,756 1

Gather (cost=9,800.50..37,530.53 rows=101,373 width=10) (actual time=19.995..341.022 rows=2,218,756 loops=1)

  • Workers Planned: 4
  • Workers Launched: 4
8. 186.176 239.464 ↓ 17.5 443,751 5

Nested Loop (cost=8,800.50..26,393.23 rows=25,343 width=10) (actual time=17.233..239.464 rows=443,751 loops=5)

  • Join Filter: ((r.title_id)::text = (pt.title_id)::text)
9. 26.086 53.270 ↓ 4.5 7,072 5

Parallel Hash Join (cost=8,799.94..20,735.46 rows=1,568 width=20) (actual time=17.203..53.270 rows=7,072 loops=5)

  • Hash Cond: ((t.title_id)::text = (r.title_id)::text)
10. 10.297 10.297 ↑ 1.2 103,284 5

Parallel Index Only Scan using titles_movies_partial_idx on titles t (cost=0.42..11,603.84 rows=126,514 width=10) (actual time=0.040..10.297 rows=103,284 loops=5)

  • Heap Fetches: 0
11. 3.718 16.887 ↑ 2.1 14,159 5

Parallel Hash (cost=8,423.44..8,423.44 rows=30,086 width=10) (actual time=16.887..16.887 rows=14,159 loops=5)

  • Buckets: 131072 Batches: 1 Memory Usage: 4416kB
12. 4.992 13.169 ↑ 2.1 14,159 5

Parallel Bitmap Heap Scan on ratings r (cost=2,055.15..8,423.44 rows=30,086 width=10) (actual time=7.237..13.169 rows=14,159 loops=5)

  • Recheck Cond: ((votes > 500) AND (rating > '5'::numeric))
  • Heap Blocks: exact=893
13. 8.177 8.177 ↑ 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=8.177..8.177 rows=70,794 loops=1)

  • Index Cond: ((votes > 500) AND (rating > '5'::numeric))
14. 0.018 0.018 ↑ 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.011..0.018 rows=63 loops=35,358)

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