explain.depesz.com

PostgreSQL's explain analyze made readable

Result: YHBL

Settings
# exclusive inclusive rows x rows loops node
1. 0.576 507.123 ↑ 1.0 753 1

Sort (cost=8,331.49..8,333.38 rows=757 width=99) (actual time=507.042..507.123 rows=753 loops=1)

  • Sort Key: (count(post.id)) DESC
  • Sort Method: quicksort Memory: 161kB
2. 237.439 506.547 ↑ 1.0 753 1

HashAggregate (cost=8,287.72..8,295.28 rows=757 width=99) (actual time=506.332..506.547 rows=753 loops=1)

  • Group Key: card.id
3. 221.246 269.108 ↓ 5.2 890,723 1

Hash Join (cost=4,490.44..7,423.81 rows=172,780 width=95) (actual time=24.383..269.108 rows=890,723 loops=1)

  • Hash Cond: (post_to_tag_link_1.tag_id = tag.id)
4. 18.627 44.494 ↑ 1.0 32,633 1

Hash Join (cost=4,385.07..5,305.10 rows=32,633 width=8) (actual time=20.989..44.494 rows=32,633 loops=1)

  • Hash Cond: (post_to_tag_link_1.post_id = post.id)
5. 5.131 5.131 ↑ 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.015..5.131 rows=32,633 loops=1)

6. 8.361 20.736 ↑ 1.0 24,492 1

Hash (cost=4,078.92..4,078.92 rows=24,492 width=4) (actual time=20.736..20.736 rows=24,492 loops=1)

  • Buckets: 32768 Batches: 1 Memory Usage: 1118kB
7. 12.375 12.375 ↑ 1.0 24,492 1

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

8. 0.765 3.368 ↓ 1.1 1,318 1

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

  • Buckets: 2048 Batches: 1 Memory Usage: 196kB
9. 0.616 2.603 ↓ 1.1 1,318 1

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

  • Hash Cond: (card_to_tag_link_1.tag_id = tag.id)
10. 0.771 1.783 ↓ 1.1 1,318 1

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

  • Hash Cond: (card_to_tag_link_1.card_id = card.id)
11. 0.283 0.283 ↓ 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.283 rows=1,318 loops=1)

12. 0.440 0.729 ↑ 1.0 757 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 104kB
13. 0.289 0.289 ↑ 1.0 757 1

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

14. 0.098 0.204 ↑ 1.0 224 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 16kB
15. 0.106 0.106 ↑ 1.0 224 1

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