explain.depesz.com

PostgreSQL's explain analyze made readable

Result: unqQ

Settings
# exclusive inclusive rows x rows loops node
1. 0.001 70.542 ↑ 1.0 10 1

Limit (cost=408.80..408.82 rows=10 width=153) (actual time=70.540..70.542 rows=10 loops=1)

  • Buffers: shared hit=51026 read=14164
2. 0.657 70.541 ↑ 8.2 10 1

Sort (cost=408.80..409.00 rows=82 width=153) (actual time=70.539..70.541 rows=10 loops=1)

  • Sort Key: articles_article.published_at DESC
  • Sort Method: top-N heapsort Memory: 27kB
  • Buffers: shared hit=51026 read=14164
3. 0.324 69.884 ↓ 34.4 2,818 1

Nested Loop (cost=34.29..407.02 rows=82 width=153) (actual time=0.094..69.884 rows=2,818 loops=1)

  • Buffers: shared hit=51026 read=14164
4. 0.012 0.012 ↑ 1.0 1 1

Seq Scan on articles_category (cost=0.00..2.51 rows=1 width=4) (actual time=0.010..0.012 rows=1 loops=1)

  • Filter: (id = 8)
  • Rows Removed by Filter: 43
  • Buffers: shared hit=2
5. 10.201 69.548 ↓ 34.4 2,818 1

Nested Loop (cost=34.29..403.69 rows=82 width=157) (actual time=0.083..69.548 rows=2,818 loops=1)

  • Buffers: shared hit=51024 read=14164
6. 1.816 14.287 ↓ 36.3 15,020 1

Nested Loop (cost=33.87..48.35 rows=414 width=4) (actual time=0.072..14.287 rows=15,020 loops=1)

  • Buffers: shared hit=1660 read=3363
7. 0.003 0.063 ↓ 1.3 4 1

HashAggregate (cost=33.44..33.47 rows=3 width=8) (actual time=0.062..0.063 rows=4 loops=1)

  • Group Key: u0.id
  • Buffers: shared hit=8 read=8
8. 0.003 0.060 ↓ 1.3 4 1

Nested Loop (cost=0.72..33.43 rows=3 width=8) (actual time=0.036..0.060 rows=4 loops=1)

  • Buffers: shared hit=8 read=8
9. 0.013 0.013 ↓ 1.3 4 1

Index Scan using articles_article_tags_article_id_524565b8 on articles_article_tags u1 (cost=0.43..8.48 rows=3 width=4) (actual time=0.012..0.013 rows=4 loops=1)

  • Index Cond: (article_id = 540956)
  • Buffers: shared hit=3 read=1
10. 0.044 0.044 ↑ 1.0 1 4

Index Only Scan using articles_tag_pkey on articles_tag u0 (cost=0.29..8.31 rows=1 width=4) (actual time=0.010..0.011 rows=1 loops=4)

  • Index Cond: (id = u1.tag_id)
  • Heap Fetches: 4
  • Buffers: shared hit=5 read=7
11. 12.408 12.408 ↓ 27.2 3,755 4

Index Scan using articles_article_tags_tag_id_56ec02c6 on articles_article_tags (cost=0.43..3.58 rows=138 width=8) (actual time=0.009..3.102 rows=3,755 loops=4)

  • Index Cond: (tag_id = u0.id)
  • Buffers: shared hit=1652 read=3355
12. 45.060 45.060 ↓ 0.0 0 15,020

Index Scan using articles_article_pkey on articles_article (cost=0.42..0.85 rows=1 width=161) (actual time=0.003..0.003 rows=0 loops=15,020)

  • Index Cond: (id = articles_article_tags.article_id)
  • Filter: ((NOT is_draft) AND (NOT is_hidden) AND (id <> 540956) AND (category_id = 8) AND (published_at < now()))
  • Rows Removed by Filter: 1
  • Buffers: shared hit=49364 read=10801