explain.depesz.com

PostgreSQL's explain analyze made readable

Result: XYkV

Settings
# exclusive inclusive rows x rows loops node
1. 0.110 3.472 ↓ 1.2 124 1

Hash Semi Join (cost=58.86..262.32 rows=100 width=890) (actual time=1.142..3.472 rows=124 loops=1)

  • Hash Cond: (p.team_id = "ANY_subquery".team_ids)
2. 0.221 3.067 ↓ 5.9 586 1

Hash Join (cost=15.38..217.47 rows=100 width=894) (actual time=0.762..3.067 rows=586 loops=1)

  • Hash Cond: (p.team_id = t.id)
3. 0.632 2.814 ↓ 5.9 586 1

Nested Loop (cost=12.93..214.70 rows=100 width=883) (actual time=0.717..2.814 rows=586 loops=1)

4. 0.262 1.004 ↓ 5.9 589 1

Hash Semi Join (cost=12.66..27.21 rows=100 width=12) (actual time=0.699..1.004 rows=589 loops=1)

  • Hash Cond: (c.id = (((jsonb_object_keys(users.cards)))::integer))
5. 0.100 0.100 ↑ 1.0 589 1

Seq Scan on cards c (cost=0.00..11.89 rows=589 width=12) (actual time=0.010..0.100 rows=589 loops=1)

6. 0.165 0.642 ↓ 5.9 589 1

Hash (cost=11.41..11.41 rows=100 width=4) (actual time=0.642..0.642 rows=589 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 29kB
7. 0.191 0.477 ↓ 5.9 589 1

Result (cost=0.14..10.41 rows=100 width=4) (actual time=0.154..0.477 rows=589 loops=1)

8. 0.265 0.286 ↓ 5.9 589 1

ProjectSet (cost=0.14..8.66 rows=100 width=32) (actual time=0.146..0.286 rows=589 loops=1)

9. 0.021 0.021 ↑ 1.0 1 1

Index Scan using users_pkey on users (cost=0.14..8.15 rows=1 width=194) (actual time=0.019..0.021 rows=1 loops=1)

  • Index Cond: (id = 2)
10. 1.178 1.178 ↑ 1.0 1 589

Index Scan using opta_players_pkey on opta_players p (cost=0.28..1.87 rows=1 width=883) (actual time=0.002..0.002 rows=1 loops=589)

  • Index Cond: (id = c.player_id)
11. 0.010 0.032 ↑ 1.0 20 1

Hash (cost=2.20..2.20 rows=20 width=11) (actual time=0.032..0.032 rows=20 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
12. 0.022 0.022 ↑ 1.0 20 1

Seq Scan on opta_teams t (cost=0.00..2.20 rows=20 width=11) (actual time=0.014..0.022 rows=20 loops=1)

13. 0.011 0.295 ↑ 25.0 4 1

Hash (cost=42.22..42.22 rows=100 width=8) (actual time=0.295..0.295 rows=4 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
14. 0.001 0.284 ↑ 25.0 4 1

Subquery Scan on ANY_subquery (cost=0.00..42.22 rows=100 width=8) (actual time=0.282..0.284 rows=4 loops=1)

15. 0.008 0.283 ↑ 25.0 4 1

ProjectSet (cost=0.00..41.22 rows=100 width=12) (actual time=0.281..0.283 rows=4 loops=1)

16. 0.034 0.275 ↑ 1.0 1 1

GroupAggregate (cost=0.00..40.71 rows=1 width=68) (actual time=0.274..0.275 rows=1 loops=1)

  • Group Key: e.id
17. 0.129 0.241 ↑ 5.0 2 1

Nested Loop (cost=0.00..40.62 rows=10 width=20) (actual time=0.185..0.241 rows=2 loops=1)

  • Join Filter: (f.id = ANY (e.fixtures))
  • Rows Removed by Join Filter: 378
18. 0.012 0.012 ↑ 1.0 1 1

Seq Scan on events e (cost=0.00..2.27 rows=1 width=43) (actual time=0.012..0.012 rows=1 loops=1)

  • Filter: (id = 25)
  • Rows Removed by Filter: 10
19. 0.100 0.100 ↑ 1.0 380 1

Seq Scan on opta_fixtures f (cost=0.00..29.80 rows=380 width=20) (actual time=0.006..0.100 rows=380 loops=1)