explain.depesz.com

A tool for finding a real cause for slow queries.

Result: mRY

options
Did it help? Consider supporting us - Bitcoin address: 12v2hUztAk2LgzQ9H9LMwuU32urHMjZQnq
# exclusive inclusive rows x rows loops node
1. 0.000 0.000 ↓ 0.0

Sort (cost=3,044,088.10..3,044,166.20 rows=31,240 width=104) (actual time=.. rows= loops=)

  • Sort Key: part.id_game
2. 0.000 0.000 ↓ 0.0

HashAggregate (cost=3,041,443.46..3,041,755.86 rows=31,240 width=104) (actual time=.. rows= loops=)

3. 0.000 0.000 ↓ 0.0

Append (cost=1,517,714.92..3,039,803.36 rows=31,240 width=104) (actual time=.. rows= loops=)

4. 0.000 0.000 ↓ 0.0

Subquery Scan part (cost=1,517,714.92..1,519,745.48 rows=15,620 width=104) (actual time=.. rows= loops=)

  • Filter: (part.r <= 1000)
5. 0.000 0.000 ↓ 0.0

WindowAgg (cost=1,517,714.92..1,519,120.69 rows=46,859 width=94) (actual time=.. rows= loops=)

6. 0.000 0.000 ↓ 0.0

Sort (cost=1,517,714.92..1,517,832.07 rows=46,859 width=94) (actual time=.. rows= loops=)

  • Sort Key: public.games.w_user, public.games.id_game
7. 0.000 0.000 ↓ 0.0

Hash Join (cost=479,014.57..1,514,079.59 rows=46,859 width=94) (actual time=.. rows= loops=)

  • Hash Cond: (public.games.b_user = u2.id_user)
8. 0.000 0.000 ↓ 0.0

Hash Join (cost=474,284.42..1,508,470.83 rows=46,859 width=73) (actual time=.. rows= loops=)

  • Hash Cond: (public.games.w_user = u1.id_user)
9. 0.000 0.000 ↓ 0.0

Bitmap Heap Scan on games (cost=470,600.70..1,503,498.49 rows=93,718 width=52) (actual time=.. rows= loops=)

  • Recheck Cond: ((total_time = 180::double precision) AND (increment = 0::double precision))
  • Filter: (stockfish_analysed AND stockfish_analysed AND (ply_count > 10))
10. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on index_total_increment (cost=0.00..470,577.28 rows=16,807,988 width=0) (actual time=.. rows= loops=)

  • Index Cond: ((total_time = 180::double precision) AND (increment = 0::double precision))
11. 0.000 0.000 ↓ 0.0

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

12. 0.000 0.000 ↓ 0.0

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

  • Filter: has_chronotype
13. 0.000 0.000 ↓ 0.0

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

14. 0.000 0.000 ↓ 0.0

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

15. 0.000 0.000 ↓ 0.0

Subquery Scan part (cost=1,517,714.92..1,519,745.48 rows=15,620 width=104) (actual time=.. rows= loops=)

  • Filter: (part.r <= 1000)
16. 0.000 0.000 ↓ 0.0

WindowAgg (cost=1,517,714.92..1,519,120.69 rows=46,859 width=94) (actual time=.. rows= loops=)

17. 0.000 0.000 ↓ 0.0

Sort (cost=1,517,714.92..1,517,832.07 rows=46,859 width=94) (actual time=.. rows= loops=)

  • Sort Key: public.games.b_user, public.games.id_game
18. 0.000 0.000 ↓ 0.0

Hash Join (cost=479,014.57..1,514,079.59 rows=46,859 width=94) (actual time=.. rows= loops=)

  • Hash Cond: (public.games.w_user = u1.id_user)
19. 0.000 0.000 ↓ 0.0

Hash Join (cost=474,284.42..1,508,470.83 rows=46,859 width=73) (actual time=.. rows= loops=)

  • Hash Cond: (public.games.b_user = u2.id_user)
20. 0.000 0.000 ↓ 0.0

Bitmap Heap Scan on games (cost=470,600.70..1,503,498.49 rows=93,718 width=52) (actual time=.. rows= loops=)

  • Recheck Cond: ((total_time = 180::double precision) AND (increment = 0::double precision))
  • Filter: (stockfish_analysed AND stockfish_analysed AND (ply_count > 10))
21. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on index_total_increment (cost=0.00..470,577.28 rows=16,807,988 width=0) (actual time=.. rows= loops=)

  • Index Cond: ((total_time = 180::double precision) AND (increment = 0::double precision))
22. 0.000 0.000 ↓ 0.0

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

23. 0.000 0.000 ↓ 0.0

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

  • Filter: has_chronotype
24. 0.000 0.000 ↓ 0.0

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

25. 0.000 0.000 ↓ 0.0

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