explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Atjd

Settings
# exclusive inclusive rows x rows loops node
1. 224.830 3,751.028 ↓ 2.1 433,042 1

Hash Right Join (cost=254,961.23..267,064.75 rows=202,209 width=81) (actual time=2,472.768..3,751.028 rows=433,042 loops=1)

  • Hash Cond: (pw.""TournamentNumber"" = t.""TournamentNumber"")
2.          

CTE w_playerwins

3. 148.749 2,295.124 ↓ 2.5 450,481 1

Finalize GroupAggregate (cost=121,883.27..177,414.55 rows=180,580 width=27) (actual time=1,399.810..2,295.124 rows=450,481 loops=1)

  • Group Key: pw_1.""TournamentNumber"", pw_1.""Username"
4. 398.684 2,146.375 ↓ 1.6 592,626 1

Gather Merge (cost=121,883.27..172,900.05 rows=361,160 width=27) (actual time=1,399.797..2,146.375 rows=592,626 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
5. 118.646 1,747.691 ↓ 1.1 197,542 3 / 3

Partial GroupAggregate (cost=120,883.25..130,213.20 rows=180,580 width=27) (actual time=1,382.099..1,747.691 rows=197,542 loops=3)

  • Group Key: pw_1.""TournamentNumber"", pw_1.""Username"
6. 1,519.566 1,629.045 ↑ 1.3 601,691 3 / 3

Sort (cost=120,883.25..122,764.29 rows=752,415 width=27) (actual time=1,382.089..1,629.045 rows=601,691 loops=3)

  • Sort Key: pw_1.""TournamentNumber"", pw_1.""Username"
  • Sort Method: external merge Disk: 25,480kB
7. 109.479 109.479 ↑ 1.3 601,691 3 / 3

Parallel Seq Scan on ""PlayerWins"" pw_1 (cost=0.00..29,439.15 rows=752,415 width=27) (actual time=0.019..109.479 rows=601,691 loops=3)

8.          

CTE w_flags

9. 194.976 723.781 ↑ 1.0 202,052 1

GroupAggregate (cost=0.42..52,290.10 rows=202,209 width=41) (actual time=0.045..723.781 rows=202,052 loops=1)

  • Group Key: f_1.""TournamentNumber"
10. 528.805 528.805 ↑ 1.0 795,080 1

Index Only Scan using ""IX_Flags_TournamentNumber_Value"" on ""Flags"" f_1 (cost=0.42..45,783.09 rows=795,879 width=11) (actual time=0.032..528.805 rows=795,080 loops=1)

  • Heap Fetches: 795,096
11. 2,455.031 2,455.031 ↓ 2.5 450,481 1

CTE Scan on w_playerwins pw (cost=0.00..3,611.60 rows=180,580 width=72) (actual time=1,399.814..2,455.031 rows=450,481 loops=1)

12. 46.109 1,071.167 ↑ 1.0 202,036 1

Hash (cost=20,950.97..20,950.97 rows=202,209 width=41) (actual time=1,071.167..1,071.167 rows=202,036 loops=1)

  • Buckets: 65,536 Batches: 8 Memory Usage: 1,782kB
13. 150.182 1,025.058 ↑ 1.0 202,036 1

Hash Join (cost=8,790.42..20,950.97 rows=202,209 width=41) (actual time=74.490..1,025.058 rows=202,036 loops=1)

  • Hash Cond: (f.""TournamentNumber"" = t.""TournamentNumber"")
14. 800.537 800.537 ↑ 1.0 202,052 1

CTE Scan on w_flags f (cost=0.00..4,044.18 rows=202,209 width=64) (actual time=0.046..800.537 rows=202,052 loops=1)

15. 36.447 74.339 ↑ 1.0 202,036 1

Hash (cost=5,268.52..5,268.52 rows=202,552 width=9) (actual time=74.339..74.339 rows=202,036 loops=1)

  • Buckets: 131,072 Batches: 4 Memory Usage: 3,044kB
16. 37.892 37.892 ↑ 1.0 202,036 1

Seq Scan on ""Tournaments"" t (cost=0.00..5,268.52 rows=202,552 width=9) (actual time=0.010..37.892 rows=202,036 loops=1)