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: 1180924
2. 0.000 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. 461.814 36,095.658 ↓ 10.4 412,887 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. 9,843.621 35,633.844 ↓ 17.7 703,408 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: 63486kB
  • Worker 0: Sort Method: quicksort Memory: 63969kB
  • Worker 1: Sort Method: quicksort Memory: 60579kB
5. 1,390.411 25,790.223 ↓ 17.7 703,408 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. 1,314.150 6,649.764 ↓ 18.3 739,585 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. 3,387.024 4,688.859 ↓ 2.3 1,103,709 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. 1,159.695 1,159.695 ↑ 1.2 5,004,000 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. 18.330 142.140 ↑ 1.2 23,598 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: 131072 Batches: 1 Memory Usage: 4416kB
10. 123.810 123.810 ↑ 1.2 23,598 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: 286020
11. 139.701 646.755 ↑ 1.2 172,140 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: 524288 Batches: 1 Memory Usage: 28384kB
12. 507.054 507.054 ↑ 1.2 172,140 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: 1769749
13. 17,750.048 17,750.048 ↑ 1.0 1 2,218,756

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