explain.depesz.com

PostgreSQL's explain analyze made readable

Result: qEKx

Settings
# exclusive inclusive rows x rows loops node
1. 0.056 4.316 ↑ 1.4 28 1

Hash Join (cost=162.79..165.39 rows=40 width=9) (actual time=4.196..4.316 rows=28 loops=1)

  • Hash Cond: (countries.cid = teams.cid)
2. 0.162 2.768 ↑ 1.3 33 1

Seq Scan on countries (cost=64.57..66.62 rows=42 width=13) (actual time=2.672..2.768 rows=33 loops=1)

  • Filter: (NOT (hashed SubPlan 1))
  • Rows Removed by Filter: 51
3.          

SubPlan (forSeq Scan)

4. 0.115 2.606 ↑ 6.9 51 1

HashAggregate (cost=60.17..63.69 rows=352 width=4) (actual time=2.594..2.606 rows=51 loops=1)

  • Group Key: teams_1.cid
5. 0.036 2.491 ↑ 1.0 352 1

Append (cost=11.91..59.29 rows=352 width=4) (actual time=0.255..2.491 rows=352 loops=1)

6. 0.076 1.293 ↑ 1.0 176 1

Hash Join (cost=11.91..27.88 rows=176 width=4) (actual time=0.254..1.293 rows=176 loops=1)

  • Hash Cond: (matches_2.hometid = teams_1.tid)
7. 1.040 1.040 ↑ 1.0 176 1

Seq Scan on matches matches_2 (cost=0.00..15.51 rows=176 width=4) (actual time=0.056..1.040 rows=176 loops=1)

  • Filter: ((matchtype)::text !~ 'Group'::text)
  • Rows Removed by Filter: 585
8. 0.095 0.177 ↑ 1.0 396 1

Hash (cost=6.96..6.96 rows=396 width=8) (actual time=0.176..0.177 rows=396 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 24kB
9. 0.082 0.082 ↑ 1.0 396 1

Seq Scan on teams teams_1 (cost=0.00..6.96 rows=396 width=8) (actual time=0.013..0.082 rows=396 loops=1)

10. 0.073 1.162 ↑ 1.0 176 1

Hash Join (cost=11.91..27.88 rows=176 width=4) (actual time=0.257..1.162 rows=176 loops=1)

  • Hash Cond: (matches_3.visittid = teams_2.tid)
11. 0.914 0.914 ↑ 1.0 176 1

Seq Scan on matches matches_3 (cost=0.00..15.51 rows=176 width=4) (actual time=0.055..0.914 rows=176 loops=1)

  • Filter: ((matchtype)::text !~ 'Group'::text)
  • Rows Removed by Filter: 585
12. 0.101 0.175 ↑ 1.0 396 1

Hash (cost=6.96..6.96 rows=396 width=8) (actual time=0.175..0.175 rows=396 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 24kB
13. 0.074 0.074 ↑ 1.0 396 1

Seq Scan on teams teams_2 (cost=0.00..6.96 rows=396 width=8) (actual time=0.011..0.074 rows=396 loops=1)

14. 0.051 1.492 ↑ 1.0 79 1

Hash (cost=97.23..97.23 rows=79 width=4) (actual time=1.492..1.492 rows=79 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 11kB
15. 0.152 1.441 ↑ 1.0 79 1

HashAggregate (cost=96.44..97.23 rows=79 width=4) (actual time=1.410..1.441 rows=79 loops=1)

  • Group Key: teams.cid
16. 0.201 1.289 ↑ 4.1 368 1

Hash Join (cost=58.16..92.63 rows=1,522 width=4) (actual time=1.017..1.289 rows=368 loops=1)

  • Hash Cond: (matches.hometid = teams.tid)
17. 0.538 0.914 ↑ 4.1 368 1

HashAggregate (cost=46.24..61.46 rows=1,522 width=4) (actual time=0.801..0.914 rows=368 loops=1)

  • Group Key: matches.hometid
18. 0.139 0.376 ↑ 1.0 1,522 1

Append (cost=0.00..42.44 rows=1,522 width=4) (actual time=0.012..0.376 rows=1,522 loops=1)

19. 0.121 0.121 ↑ 1.0 761 1

Seq Scan on matches (cost=0.00..13.61 rows=761 width=4) (actual time=0.011..0.121 rows=761 loops=1)

20. 0.116 0.116 ↑ 1.0 761 1

Seq Scan on matches matches_1 (cost=0.00..13.61 rows=761 width=4) (actual time=0.007..0.116 rows=761 loops=1)

21. 0.092 0.174 ↑ 1.0 396 1

Hash (cost=6.96..6.96 rows=396 width=8) (actual time=0.173..0.174 rows=396 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 24kB
22. 0.082 0.082 ↑ 1.0 396 1

Seq Scan on teams (cost=0.00..6.96 rows=396 width=8) (actual time=0.008..0.082 rows=396 loops=1)

Planning time : 0.986 ms