explain.depesz.com

PostgreSQL's explain analyze made readable

Result: laPv

Settings

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 123.171 38,892.342 ↓ 22.0 22 1

Limit (cost=644,045.38..644,045.50 rows=1 width=674) (actual time=38,892.286..38,892.342 rows=22 loops=1)

2. 2,025.536 38,769.171 ↓ 1.2 307,172 1

Gather Merge (cost=615,015.52..644,045.38 rows=248,810 width=674) (actual time=36,109.640..38,769.171 rows=307,172 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
3. 2,992.726 36,743.635 ↑ 1.2 102,391 3 / 3

Sort (cost=614,015.50..614,326.51 rows=124,405 width=674) (actual time=35,916.339..36,743.635 rows=102,391 loops=3)

  • Sort Key: comments."timestamp
  • Sort Method: external merge Disk: 78,560kB
  • Worker 0: Sort Method: external merge Disk: 71,848kB
  • Worker 1: Sort Method: external merge Disk: 72,944kB
4. 163.288 33,750.909 ↑ 1.2 102,391 3 / 3

Parallel Hash Left Join (cost=292,650.94..566,065.92 rows=124,405 width=674) (actual time=17,503.427..33,750.909 rows=102,391 loops=3)

  • Hash Cond: (comments_parent.user_id = parent_users.id)
5. 221.260 33,547.563 ↑ 1.2 102,391 3 / 3

Parallel Hash Left Join (cost=288,516.99..561,605.38 rows=124,405 width=673) (actual time=17,463.087..33,547.563 rows=102,391 loops=3)

  • Hash Cond: (comments.parent = comments_parent.id)
6. 142.880 15,949.157 ↑ 1.2 102,391 3 / 3

Hash Left Join (cost=4,886.81..277,648.64 rows=124,405 width=649) (actual time=80.182..15,949.157 rows=102,391 loops=3)

  • Hash Cond: (comments.id = votes.comments_talks_id)
7. 156.064 15,806.249 ↑ 1.2 102,391 3 / 3

Hash Left Join (cost=4,838.56..277,273.83 rows=124,405 width=637) (actual time=80.116..15,806.249 rows=102,391 loops=3)

  • Hash Cond: (users.id = rating.user_id)
8. 181.043 15,611.484 ↑ 1.2 102,391 3 / 3

Parallel Hash Left Join (cost=4,133.95..276,242.63 rows=124,405 width=637) (actual time=41.227..15,611.484 rows=102,391 loops=3)

  • Hash Cond: (comments.user_id = users.id)
9. 15,389.476 15,389.476 ↑ 1.2 102,391 3 / 3

Parallel Seq Scan on comments_talks comments (cost=0.00..271,782.10 rows=124,405 width=610) (actual time=0.010..15,389.476 rows=102,391 loops=3)

  • Filter: (talk_id = 7,606)
  • Rows Removed by Filter: 845,456
10. 20.543 40.965 ↑ 1.2 22,767 3 / 3

Parallel Hash (cost=3,778.97..3,778.97 rows=28,398 width=27) (actual time=40.964..40.965 rows=22,767 loops=3)

  • Buckets: 131,072 Batches: 1 Memory Usage: 5,312kB
11. 20.422 20.422 ↑ 1.2 22,767 3 / 3

Parallel Seq Scan on users (cost=0.00..3,778.97 rows=28,398 width=27) (actual time=0.014..20.422 rows=22,767 loops=3)

12. 20.262 38.701 ↑ 1.0 25,090 3 / 3

Hash (cost=389.27..389.27 rows=25,227 width=16) (actual time=38.700..38.701 rows=25,090 loops=3)

  • Buckets: 32,768 Batches: 1 Memory Usage: 1,433kB
13. 18.439 18.439 ↑ 1.0 25,090 3 / 3

Seq Scan on users_rating_view rating (cost=0.00..389.27 rows=25,227 width=16) (actual time=0.028..18.439 rows=25,090 loops=3)

14. 0.002 0.028 ↓ 0.0 0 3 / 3

Hash (cost=27.00..27.00 rows=1,700 width=20) (actual time=0.027..0.028 rows=0 loops=3)

  • Buckets: 2,048 Batches: 1 Memory Usage: 16kB
15. 0.026 0.026 ↓ 0.0 0 3 / 3

Seq Scan on comments_talks_votes_count votes (cost=0.00..27.00 rows=1,700 width=20) (actual time=0.025..0.026 rows=0 loops=3)

16. 993.137 17,377.146 ↑ 1.3 947,846 3 / 3

Parallel Hash (cost=268,820.08..268,820.08 rows=1,184,808 width=24) (actual time=17,377.146..17,377.146 rows=947,846 loops=3)

  • Buckets: 4,194,304 Batches: 1 Memory Usage: 188,608kB
17. 16,384.009 16,384.009 ↑ 1.3 947,846 3 / 3

Parallel Seq Scan on comments_talks comments_parent (cost=0.00..268,820.08 rows=1,184,808 width=24) (actual time=0.085..16,384.009 rows=947,846 loops=3)

18. 20.481 40.058 ↑ 1.2 22,767 3 / 3

Parallel Hash (cost=3,778.97..3,778.97 rows=28,398 width=17) (actual time=40.058..40.058 rows=22,767 loops=3)

  • Buckets: 131,072 Batches: 1 Memory Usage: 4,672kB
19. 19.577 19.577 ↑ 1.2 22,767 3 / 3

Parallel Seq Scan on users parent_users (cost=0.00..3,778.97 rows=28,398 width=17) (actual time=0.013..19.577 rows=22,767 loops=3)

Planning time : 3.585 ms
Execution time : 38,928.699 ms