explain.depesz.com

PostgreSQL's explain analyze made readable

Result: mNxG

Settings
# exclusive inclusive rows x rows loops node
1. 295.243 13,917.802 ↑ 10.8 2,933 1

Finalize GroupAggregate (cost=312,859.29..324,517.01 rows=31,792 width=22) (actual time=12,037.750..13,917.802 rows=2,933 loops=1)

  • Group Key: p.name
  • Filter: (count(*) > 10)
  • Rows Removed by Filter: 1,180,924
2. 1,590.673 13,622.559 ↓ 15.6 1,238,660 1

Gather Merge (cost=312,859.29..322,728.71 rows=79,480 width=22) (actual time=12,036.980..13,622.559 rows=1,238,660 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
3. 153.938 12,031.886 ↓ 10.4 412,887 3 / 3

Partial GroupAggregate (cost=311,859.27..312,554.72 rows=39,740 width=22) (actual time=11,779.703..12,031.886 rows=412,887 loops=3)

  • Group Key: p.name
4. 3,281.207 11,877.948 ↓ 17.7 703,408 3 / 3

Sort (cost=311,859.27..311,958.62 rows=39,740 width=14) (actual time=11,779.692..11,877.948 rows=703,408 loops=3)

  • Sort Key: p.name
  • Sort Method: quicksort Memory: 63,486kB
  • Worker 0: Sort Method: quicksort Memory: 63,969kB
  • Worker 1: Sort Method: quicksort Memory: 60,579kB
5. 463.470 8,596.741 ↓ 17.7 703,408 3 / 3

Nested Loop (cost=113,415.03..308,823.47 rows=39,740 width=14) (actual time=264.717..8,596.741 rows=703,408 loops=3)

6. 438.050 2,216.588 ↓ 18.3 739,585 3 / 3

Parallel Hash Join (cost=113,414.59..289,249.56 rows=40,485 width=10) (actual time=264.522..2,216.588 rows=739,585 loops=3)

  • Hash Cond: ((r.title_id)::text = (t.title_id)::text)
7. 1,129.008 1,562.953 ↓ 2.3 1,103,709 3 / 3

Parallel Hash Join (cost=12,089.98..186,677.13 rows=475,359 width=30) (actual time=47.581..1,562.953 rows=1,103,709 loops=3)

  • Hash Cond: ((pt.title_id)::text = (r.title_id)::text)
8. 386.565 386.565 ↑ 1.2 5,004,000 3 / 3

Parallel Seq Scan on people_titles pt (cost=0.00..158,167.76 rows=6,254,976 width=20) (actual time=0.006..386.565 rows=5,004,000 loops=3)

9. 6.110 47.380 ↑ 1.2 23,598 3 / 3

Parallel Hash (cost=11,722.33..11,722.33 rows=29,412 width=10) (actual time=47.380..47.380 rows=23,598 loops=3)

  • Buckets: 131,072 Batches: 1 Memory Usage: 4,416kB
10. 41.270 41.270 ↑ 1.2 23,598 3 / 3

Parallel Seq Scan on ratings r (cost=0.00..11,722.33 rows=29,412 width=10) (actual time=0.011..41.270 rows=23,598 loops=3)

  • Filter: ((rating > '5'::numeric) AND (votes > 500))
  • Rows Removed by Filter: 286,020
11. 46.567 215.585 ↑ 1.2 172,140 3 / 3

Parallel Hash (cost=98,739.66..98,739.66 rows=206,796 width=10) (actual time=215.585..215.585 rows=172,140 loops=3)

  • Buckets: 524,288 Batches: 1 Memory Usage: 28,384kB
12. 169.018 169.018 ↑ 1.2 172,140 3 / 3

Parallel Seq Scan on titles t (cost=0.00..98,739.66 rows=206,796 width=10) (actual time=0.016..169.018 rows=172,140 loops=3)

  • Filter: (kind_id = 2)
  • Rows Removed by Filter: 1,769,749
13. 5,916.683 5,916.683 ↑ 1.0 1 2,218,756 / 3

Index Scan using people_pkey on people p (cost=0.43..0.48 rows=1 width=24) (actual time=0.008..0.008 rows=1 loops=2,218,756)

  • Index Cond: ((name_id)::text = (pt.name_id)::text)
  • Filter: (death_year IS NULL)
  • Rows Removed by Filter: 0
Planning time : 0.776 ms
Execution time : 13,931.490 ms