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. 0.000 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. 8,978.178 110,230.905 ↑ 1.2 102,391 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: 78560kB
  • Worker 0: Sort Method: external merge Disk: 71848kB
  • Worker 1: Sort Method: external merge Disk: 72944kB
4. 489.864 101,252.727 ↑ 1.2 102,391 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. 663.780 100,642.689 ↑ 1.2 102,391 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. 428.640 47,847.471 ↑ 1.2 102,391 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. 468.192 47,418.747 ↑ 1.2 102,391 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. 543.129 46,834.452 ↑ 1.2 102,391 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. 46,168.428 46,168.428 ↑ 1.2 102,391 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 = 7606)
  • Rows Removed by Filter: 845456
10. 61.629 122.895 ↑ 1.2 22,767 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: 131072 Batches: 1 Memory Usage: 5312kB
11. 61.266 61.266 ↑ 1.2 22,767 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. 60.786 116.103 ↑ 1.0 25,090 3

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

  • Buckets: 32768 Batches: 1 Memory Usage: 1433kB
13. 55.317 55.317 ↑ 1.0 25,090 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.006 0.084 ↓ 0.0 0 3

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

  • Buckets: 2048 Batches: 1 Memory Usage: 16kB
15. 0.078 0.078 ↓ 0.0 0 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. 2,979.411 52,131.438 ↑ 1.3 947,846 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: 4194304 Batches: 1 Memory Usage: 188608kB
17. 49,152.027 49,152.027 ↑ 1.3 947,846 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. 61.443 120.174 ↑ 1.2 22,767 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: 131072 Batches: 1 Memory Usage: 4672kB
19. 58.731 58.731 ↑ 1.2 22,767 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