explain.depesz.com

PostgreSQL's explain analyze made readable

Result: JPFw

Settings
# exclusive inclusive rows x rows loops node
1. 0.002 0.519 ↑ 1.0 10 1

Limit (cost=1.72..2,009.78 rows=10 width=495) (actual time=0.059..0.519 rows=10 loops=1)

2. 0.034 0.517 ↑ 67.9 10 1

WindowAgg (cost=1.72..136,349.00 rows=679 width=495) (actual time=0.059..0.517 rows=10 loops=1)

3. 0.003 0.483 ↑ 67.9 10 1

Nested Loop Left Join (cost=1.72..136,328.63 rows=679 width=435) (actual time=0.049..0.483 rows=10 loops=1)

4. 0.000 0.440 ↑ 67.9 10 1

Nested Loop Left Join (cost=1.43..130,675.95 rows=679 width=347) (actual time=0.045..0.440 rows=10 loops=1)

5. 0.001 0.431 ↑ 67.9 10 1

Nested Loop Left Join (cost=1.15..130,664.30 rows=679 width=259) (actual time=0.040..0.431 rows=10 loops=1)

6. 0.004 0.360 ↑ 67.9 10 1

Nested Loop Left Join (cost=0.72..125,138.14 rows=679 width=55) (actual time=0.032..0.360 rows=10 loops=1)

7. 0.286 0.286 ↑ 67.9 10 1

Index Scan using words_scores_length_mid_idx on words_scores s (cost=0.43..121,529.35 rows=679 width=23) (actual time=0.024..0.286 rows=10 loops=1)

  • Filter: (uid = 5)
  • Rows Removed by Filter: 129
8. 0.070 0.070 ↑ 1.0 1 10

Index Scan using words_games_pkey on words_games g (cost=0.29..5.31 rows=1 width=36) (actual time=0.007..0.007 rows=1 loops=10)

  • Index Cond: (s.gid = gid)
9. 0.070 0.070 ↑ 1.0 1 10

Index Scan using words_moves_pkey on words_moves m (cost=0.43..8.14 rows=1 width=212) (actual time=0.007..0.007 rows=1 loops=10)

  • Index Cond: (s.mid = mid)
10. 0.006 0.010 ↑ 1.0 1 10

Materialize (cost=0.29..3.17 rows=1 width=88) (actual time=0.001..0.001 rows=1 loops=10)

11. 0.000 0.004 ↑ 1.0 1 1

Subquery Scan on s1 (cost=0.29..3.17 rows=1 width=88) (actual time=0.004..0.004 rows=1 loops=1)

12. 0.000 0.004 ↑ 1.0 1 1

Limit (cost=0.29..3.16 rows=1 width=180) (actual time=0.004..0.004 rows=1 loops=1)

13. 0.004 0.004 ↑ 6.0 1 1

Index Scan using words_social_uid_stamp_idx on words_social s1_1 (cost=0.29..17.51 rows=6 width=180) (actual time=0.004..0.004 rows=1 loops=1)

  • Index Cond: (uid = 5)
14. 0.020 0.040 ↑ 1.0 1 10

Limit (cost=0.29..8.30 rows=1 width=180) (actual time=0.003..0.004 rows=1 loops=10)

15. 0.020 0.020 ↑ 1.0 1 10

Index Scan using words_social_uid_stamp_idx on words_social s2 (cost=0.29..8.30 rows=1 width=180) (actual time=0.002..0.002 rows=1 loops=10)

  • Index Cond: (uid = CASE WHEN (g.player1 = 5) THEN g.player2 ELSE g.player1 END)