explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Wq3l

Settings
# exclusive inclusive rows x rows loops node
1. 192.969 274.460 ↓ 10.3 890,723 1

Hash Join (cost=6,007.14..7,770.64 rows=86,390 width=91) (actual time=63.466..274.460 rows=890,723 loops=1)

  • Hash Cond: (post_to_tag_link_1.tag_id = tag.id)
2. 13.676 78.772 ↓ 2.0 32,633 1

Hash Join (cost=5,901.77..6,658.63 rows=16,316 width=4) (actual time=60.730..78.772 rows=32,633 loops=1)

  • Hash Cond: (post_to_tag_link_1.post_id = post.id)
3. 4.421 4.421 ↑ 1.0 32,633 1

Seq Scan on post_to_tag_link post_to_tag_link_1 (cost=0.00..471.33 rows=32,633 width=8) (actual time=0.014..4.421 rows=32,633 loops=1)

4. 7.245 60.675 ↓ 2.0 24,491 1

Hash (cost=5,748.69..5,748.69 rows=12,246 width=8) (actual time=60.675..60.675 rows=24,491 loops=1)

  • Buckets: 32768 (originally 16384) Batches: 1 (originally 1) Memory Usage: 1213kB
5. 12.800 53.430 ↓ 2.0 24,491 1

Hash Join (cost=1,336.75..5,748.69 rows=12,246 width=8) (actual time=33.678..53.430 rows=24,491 loops=1)

  • Hash Cond: (post.id = a.post_id)
6. 7.054 7.054 ↑ 1.0 24,492 1

Seq Scan on post (cost=0.00..4,078.92 rows=24,492 width=4) (actual time=0.007..7.054 rows=24,492 loops=1)

7. 6.222 33.576 ↓ 1.0 24,491 1

Hash (cost=1,035.27..1,035.27 rows=24,118 width=4) (actual time=33.576..33.576 rows=24,491 loops=1)

  • Buckets: 32768 Batches: 1 Memory Usage: 1118kB
8. 4.128 27.354 ↓ 1.0 24,491 1

Subquery Scan on a (cost=552.91..1,035.27 rows=24,118 width=4) (actual time=16.984..27.354 rows=24,491 loops=1)

9. 18.623 23.226 ↓ 1.0 24,491 1

HashAggregate (cost=552.91..794.09 rows=24,118 width=36) (actual time=16.983..23.226 rows=24,491 loops=1)

  • Group Key: post_to_tag_link.post_id
10. 4.603 4.603 ↑ 1.0 32,633 1

Seq Scan on post_to_tag_link (cost=0.00..471.33 rows=32,633 width=4) (actual time=0.013..4.603 rows=32,633 loops=1)

11. 0.515 2.719 ↓ 1.1 1,318 1

Hash (cost=90.55..90.55 rows=1,186 width=99) (actual time=2.719..2.719 rows=1,318 loops=1)

  • Buckets: 2048 Batches: 1 Memory Usage: 196kB
12. 0.581 2.204 ↓ 1.1 1,318 1

Hash Join (cost=40.07..90.55 rows=1,186 width=99) (actual time=0.755..2.204 rows=1,318 loops=1)

  • Hash Cond: (card_to_tag_link_1.tag_id = tag.id)
13. 0.669 1.493 ↓ 1.1 1,318 1

Hash Join (cost=30.03..64.20 rows=1,186 width=95) (actual time=0.619..1.493 rows=1,318 loops=1)

  • Hash Cond: (card_to_tag_link_1.card_id = card.id)
14. 0.229 0.229 ↓ 1.1 1,318 1

Seq Scan on card_to_tag_link card_to_tag_link_1 (cost=0.00..17.86 rows=1,186 width=8) (actual time=0.015..0.229 rows=1,318 loops=1)

15. 0.332 0.595 ↑ 1.0 757 1

Hash (cost=20.57..20.57 rows=757 width=91) (actual time=0.595..0.595 rows=757 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 104kB
16. 0.263 0.263 ↑ 1.0 757 1

Seq Scan on card (cost=0.00..20.57 rows=757 width=91) (actual time=0.008..0.263 rows=757 loops=1)

17. 0.060 0.130 ↑ 1.0 224 1

Hash (cost=7.24..7.24 rows=224 width=4) (actual time=0.130..0.130 rows=224 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 16kB
18. 0.070 0.070 ↑ 1.0 224 1

Seq Scan on tag (cost=0.00..7.24 rows=224 width=4) (actual time=0.012..0.070 rows=224 loops=1)