explain.depesz.com

A tool for finding a real cause for slow queries.

Result: CXA

options
Did it help? Consider supporting us - Bitcoin address: 12v2hUztAk2LgzQ9H9LMwuU32urHMjZQnq
# exclusive inclusive rows x rows loops node
1. 133.461 417,762.731 ↑ 3.4 123,117 1

Sort (cost=3,412,912.35..3,413,954.57 rows=416,890 width=104) (actual time=417,743.945..417,762.731 rows=123,117 loops=1)

  • Sort Key: part.id_game
  • Sort Method: quicksort Memory: 20386kB
2. 220.188 417,629.270 ↑ 3.4 123,117 1

HashAggregate (cost=3,347,029.21..3,351,198.11 rows=416,890 width=104) (actual time=417,568.976..417,629.270 rows=123,117 loops=1)

3. 15.112 417,409.082 ↑ 3.4 124,075 1

Append (cost=1,633,388.90..3,325,142.49 rows=416,890 width=104) (actual time=212,172.763..417,409.082 rows=124,075 loops=1)

4. 45.117 212,712.161 ↑ 3.4 61,939 1

Subquery Scan part (cost=1,633,388.90..1,660,486.79 rows=208,445 width=104) (actual time=212,172.761..212,712.161 rows=61,939 loops=1)

  • Filter: (part.r <= 1000)
5. 462.759 212,667.044 ↑ 2.5 251,827 1

WindowAgg (cost=1,633,388.90..1,652,148.98 rows=625,336 width=94) (actual time=212,172.756..212,667.044 rows=251,827 loops=1)

6. 561.799 212,204.285 ↑ 2.5 251,827 1

Sort (cost=1,633,388.90..1,634,952.24 rows=625,336 width=94) (actual time=212,172.715..212,204.285 rows=251,827 loops=1)

  • Sort Key: public.games.w_user, public.games.id_game
  • Sort Method: quicksort Memory: 41558kB
7. 318.361 211,642.486 ↑ 2.5 251,827 1

Hash Join (cost=479,303.81..1,541,123.45 rows=625,336 width=94) (actual time=101,610.220..211,642.486 rows=251,827 loops=1)

  • Hash Cond: (public.games.b_user = u2.id_user)
8. 514.464 211,151.189 ↑ 2.5 251,827 1

Hash Join (cost=474,573.66..1,524,668.25 rows=625,336 width=73) (actual time=101,437.144..211,151.189 rows=251,827 loops=1)

  • Hash Cond: (public.games.w_user = u1.id_user)
9. 109,399.420 210,618.888 ↓ 1.7 2,091,568 1

Bitmap Heap Scan on games (cost=470,889.95..1,503,787.74 rows=1,250,679 width=52) (actual time=101,419.182..210,618.888 rows=2,091,568 loops=1)

  • Recheck Cond: ((total_time = 180::double precision) AND (increment = 0::double precision))
  • Filter: (stockfish_analysed AND (ply_count > 10))
10. 101,219.468 101,219.468 ↓ 1.2 19,861,183 1

Bitmap Index Scan on index_total_increment (cost=0.00..470,577.28 rows=16,807,988 width=0) (actual time=101,219.468..101,219.468 rows=19,861,183 loops=1)

  • Index Cond: ((total_time = 180::double precision) AND (increment = 0::double precision))
11. 0.043 17.837 ↑ 1,195.9 70 1

Hash (cost=2,637.29..2,637.29 rows=83,714 width=25) (actual time=17.837..17.837 rows=70 loops=1)

12. 17.794 17.794 ↑ 1,195.9 70 1

Seq Scan on users u1 (cost=0.00..2,637.29 rows=83,714 width=25) (actual time=16.632..17.794 rows=70 loops=1)

  • Filter: has_chronotype
13. 40.209 172.936 ↑ 1.0 167,255 1

Hash (cost=2,637.29..2,637.29 rows=167,429 width=25) (actual time=172.936..172.936 rows=167,255 loops=1)

14. 132.727 132.727 ↑ 1.0 167,255 1

Seq Scan on users u2 (cost=0.00..2,637.29 rows=167,429 width=25) (actual time=47.588..132.727 rows=167,255 loops=1)

15. 45.156 204,681.809 ↑ 3.4 62,136 1

Subquery Scan part (cost=1,633,388.90..1,660,486.79 rows=208,445 width=104) (actual time=204,131.731..204,681.809 rows=62,136 loops=1)

  • Filter: (part.r <= 1000)
16. 472.304 204,636.653 ↑ 2.5 254,125 1

WindowAgg (cost=1,633,388.90..1,652,148.98 rows=625,336 width=94) (actual time=204,131.728..204,636.653 rows=254,125 loops=1)

17. 560.190 204,164.349 ↑ 2.5 254,125 1

Sort (cost=1,633,388.90..1,634,952.24 rows=625,336 width=94) (actual time=204,131.703..204,164.349 rows=254,125 loops=1)

  • Sort Key: public.games.b_user, public.games.id_game
  • Sort Method: quicksort Memory: 41881kB
18. 314.143 203,604.159 ↑ 2.5 254,125 1

Hash Join (cost=479,303.81..1,541,123.45 rows=625,336 width=94) (actual time=96,089.697..203,604.159 rows=254,125 loops=1)

  • Hash Cond: (public.games.w_user = u1.id_user)
19. 511.749 203,137.689 ↑ 2.5 254,125 1

Hash Join (cost=474,573.66..1,524,668.25 rows=625,336 width=73) (actual time=95,937.255..203,137.689 rows=254,125 loops=1)

  • Hash Cond: (public.games.b_user = u2.id_user)
20. 107,750.221 202,609.286 ↓ 1.7 2,091,568 1

Bitmap Heap Scan on games (cost=470,889.95..1,503,787.74 rows=1,250,679 width=52) (actual time=95,053.682..202,609.286 rows=2,091,568 loops=1)

  • Recheck Cond: ((total_time = 180::double precision) AND (increment = 0::double precision))
  • Filter: (stockfish_analysed AND (ply_count > 10))
21. 94,859.065 94,859.065 ↓ 1.2 19,861,183 1

Bitmap Index Scan on index_total_increment (cost=0.00..470,577.28 rows=16,807,988 width=0) (actual time=94,859.065..94,859.065 rows=19,861,183 loops=1)

  • Index Cond: ((total_time = 180::double precision) AND (increment = 0::double precision))
22. 0.042 16.654 ↑ 1,195.9 70 1

Hash (cost=2,637.29..2,637.29 rows=83,714 width=25) (actual time=16.654..16.654 rows=70 loops=1)

23. 16.612 16.612 ↑ 1,195.9 70 1

Seq Scan on users u2 (cost=0.00..2,637.29 rows=83,714 width=25) (actual time=15.524..16.612 rows=70 loops=1)

  • Filter: has_chronotype
24. 40.802 152.327 ↑ 1.0 167,255 1

Hash (cost=2,637.29..2,637.29 rows=167,429 width=25) (actual time=152.327..152.327 rows=167,255 loops=1)

25. 111.525 111.525 ↑ 1.0 167,255 1

Seq Scan on users u1 (cost=0.00..2,637.29 rows=167,429 width=25) (actual time=15.872..111.525 rows=167,255 loops=1)