explain.depesz.com

PostgreSQL's explain analyze made readable

Result: FkWF

Settings
# exclusive inclusive rows x rows loops node
1. 0.199 74.580 ↑ 1.1 191 1

Sort (cost=6,374.37..6,374.91 rows=216 width=99) (actual time=74.554..74.580 rows=191 loops=1)

  • Sort Key: (count(post.id)) DESC
  • Sort Method: quicksort Memory: 54kB
2. 11.966 74.381 ↑ 1.1 191 1

HashAggregate (cost=6,363.83..6,365.99 rows=216 width=99) (actual time=74.325..74.381 rows=191 loops=1)

  • Group Key: card.id
3. 15.845 62.415 ↑ 1.5 37,118 1

Hash Join (cost=4,458.98..6,089.95 rows=54,777 width=95) (actual time=24.516..62.415 rows=37,118 loops=1)

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

Hash Join (cost=4,385.14..5,305.17 rows=32,633 width=8) (actual time=22.982..45.059 rows=32,633 loops=1)

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

6. 9.213 22.681 ↑ 1.0 24,495 1

Hash (cost=4,078.95..4,078.95 rows=24,495 width=4) (actual time=22.681..22.681 rows=24,495 loops=1)

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

Seq Scan on post (cost=0.00..4,078.95 rows=24,495 width=4) (actual time=0.011..13.468 rows=24,495 loops=1)

8. 0.121 1.511 ↑ 1.9 195 1

Hash (cost=69.14..69.14 rows=376 width=99) (actual time=1.511..1.511 rows=195 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 31kB
9. 0.120 1.390 ↑ 1.9 195 1

Hash Join (cost=36.15..69.14 rows=376 width=99) (actual time=0.760..1.390 rows=195 loops=1)

  • Hash Cond: (card_to_tag_link_1.tag_id = tag.id)
10. 0.357 1.104 ↑ 1.9 195 1

Hash Join (cost=26.11..53.93 rows=376 width=95) (actual time=0.570..1.104 rows=195 loops=1)

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

12. 0.156 0.520 ↑ 1.1 195 1

Hash (cost=23.41..23.41 rows=216 width=91) (actual time=0.520..0.520 rows=195 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 29kB
13. 0.364 0.364 ↑ 1.1 195 1

Seq Scan on card (cost=0.00..23.41 rows=216 width=91) (actual time=0.016..0.364 rows=195 loops=1)

  • Filter: ((type)::text = ANY ('{event,area,region}'::text[]))
  • Rows Removed by Filter: 562
14. 0.078 0.166 ↑ 1.0 224 1

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

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

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