explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 6Nkp

Settings
# exclusive inclusive rows x rows loops node
1. 17.385 103.589 ↑ 1.3 3 1

HashAggregate (cost=5,964.90..5,964.94 rows=4 width=64) (actual time=103.588..103.589 rows=3 loops=1)

  • Group Key: s.id
2. 27.074 86.204 ↓ 5.5 69,542 1

Hash Right Join (cost=3,636.12..5,741.85 rows=12,746 width=22) (actual time=51.928..86.204 rows=69,542 loops=1)

  • Hash Cond: (es.id = e.id)
3. 7.240 7.240 ↑ 1.0 79,791 1

Seq Scan on event_settings es (cost=0.00..1,672.74 rows=81,474 width=10) (actual time=0.013..7.240 rows=79,791 loops=1)

4. 16.819 51.890 ↓ 5.5 69,542 1

Hash (cost=3,476.80..3,476.80 rows=12,746 width=28) (actual time=51.889..51.890 rows=69,542 loops=1)

  • Buckets: 131,072 (originally 16384) Batches: 1 (originally 1) Memory Usage: 5,371kB
5. 13.722 35.071 ↓ 5.5 69,542 1

Hash Right Join (cost=5.57..3,476.80 rows=12,746 width=28) (actual time=0.045..35.071 rows=69,542 loops=1)

  • Hash Cond: (e.sport_id = s.id)
6. 21.318 21.318 ↓ 1.0 79,791 1

Seq Scan on event e (cost=0.00..3,226.65 rows=79,665 width=28) (actual time=0.006..21.318 rows=79,791 loops=1)

7. 0.002 0.031 ↑ 1.3 3 1

Hash (cost=5.52..5.52 rows=4 width=8) (actual time=0.031..0.031 rows=3 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
8. 0.029 0.029 ↑ 1.3 3 1

Index Only Scan using pk_sport on sport s (cost=0.26..5.52 rows=4 width=8) (actual time=0.006..0.029 rows=3 loops=1)

  • Index Cond: (id = ANY ('{1,2,3,4}'::bigint[]))