explain.depesz.com

PostgreSQL's explain analyze made readable

Result: vSuf

Settings
# exclusive inclusive rows x rows loops node
1. 0.591 499.786 ↑ 1.0 753 1

Sort (cost=8,667.12..8,669.01 rows=757 width=99) (actual time=499.704..499.786 rows=753 loops=1)

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

HashAggregate (cost=8,623.35..8,630.92 rows=757 width=99) (actual time=498.976..499.195 rows=753 loops=1)

  • Group Key: card.id
3. 217.208 266.721 ↓ 4.6 890,723 1

Hash Join (cost=4,496.83..7,663.30 rows=192,010 width=95) (actual time=26.721..266.721 rows=890,723 loops=1)

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

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

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

6. 9.165 22.669 ↑ 1.0 24,492 1

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

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

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

8. 0.875 3.720 ↑ 1.0 1,318 1

Hash (cost=95.29..95.29 rows=1,318 width=99) (actual time=3.720..3.720 rows=1,318 loops=1)

  • Buckets: 2048 Batches: 1 Memory Usage: 196kB
9. 0.774 2.845 ↑ 1.0 1,318 1

Hash Join (cost=40.07..95.29 rows=1,318 width=99) (actual time=1.058..2.845 rows=1,318 loops=1)

  • Hash Cond: (card_to_tag_link_1.tag_id = tag.id)
10. 0.815 1.911 ↑ 1.0 1,318 1

Hash Join (cost=30.03..67.12 rows=1,318 width=95) (actual time=0.876..1.911 rows=1,318 loops=1)

  • Hash Cond: (card_to_tag_link_1.card_id = card.id)
11. 0.266 0.266 ↑ 1.0 1,318 1

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

12. 0.494 0.830 ↑ 1.0 757 1

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

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

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

14. 0.082 0.160 ↑ 1.0 224 1

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

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

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