explain.depesz.com

PostgreSQL's explain analyze made readable

Result: M43r

Settings
# exclusive inclusive rows x rows loops node
1. 0.595 169.086 ↑ 1.0 732 1

Sort (cost=5,695.47..5,697.36 rows=757 width=99) (actual time=169.006..169.086 rows=732 loops=1)

  • Sort Key: (count(post.id)) DESC
  • Sort Method: quicksort Memory: 157kB
2. 75.008 168.491 ↑ 1.0 732 1

HashAggregate (cost=5,651.70..5,659.27 rows=757 width=99) (actual time=168.305..168.491 rows=732 loops=1)

  • Group Key: card.id
3. 69.921 93.483 ↓ 6.7 248,491 1

Hash Join (cost=4,380.17..5,467.49 rows=36,842 width=95) (actual time=10.971..93.483 rows=248,491 loops=1)

  • Hash Cond: (post_to_tag_link_1.tag_id = tag.id)
4. 8.259 19.828 ↓ 1.7 10,799 1

Hash Join (cost=4,268.41..4,924.72 rows=6,261 width=8) (actual time=7.204..19.828 rows=10,799 loops=1)

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

6. 1.670 7.106 ↑ 1.0 4,682 1

Hash (cost=4,209.66..4,209.66 rows=4,700 width=4) (actual time=7.106..7.106 rows=4,682 loops=1)

  • Buckets: 8192 Batches: 1 Memory Usage: 229kB
7. 3.721 5.436 ↑ 1.0 4,682 1

Bitmap Heap Scan on post (cost=92.72..4,209.66 rows=4,700 width=4) (actual time=1.980..5.436 rows=4,682 loops=1)

  • Recheck Cond: (created_at < (now() - '60 days'::interval))
  • Heap Blocks: exact=1072
8. 1.715 1.715 ↑ 1.0 4,682 1

Bitmap Index Scan on post_created_at_idx (cost=0.00..91.54 rows=4,700 width=0) (actual time=1.715..1.715 rows=4,682 loops=1)

  • Index Cond: (created_at < (now() - '60 days'::interval))
9. 0.890 3.734 ↑ 1.0 1,318 1

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

  • Buckets: 2048 Batches: 1 Memory Usage: 196kB
10. 0.739 2.844 ↑ 1.0 1,318 1

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

  • Hash Cond: (card_to_tag_link_1.tag_id = tag.id)
11. 0.831 1.920 ↑ 1.0 1,318 1

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

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

13. 0.492 0.805 ↑ 1.0 757 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 104kB
14. 0.313 0.313 ↑ 1.0 757 1

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

15. 0.099 0.185 ↑ 1.0 224 1

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

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

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