explain.depesz.com

PostgreSQL's explain analyze made readable

Result: AtCE

Settings
# exclusive inclusive rows x rows loops node
1. 0.004 69.130 ↑ 1.0 10 1

Limit (cost=412.30..412.32 rows=10 width=153) (actual time=69.127..69.130 rows=10 loops=1)

  • Buffers: shared hit=50653 read=14537
2. 1.261 69.126 ↑ 17.0 10 1

Sort (cost=412.30..412.72 rows=170 width=153) (actual time=69.125..69.126 rows=10 loops=1)

  • Sort Key: articles_article.published_at DESC
  • Sort Method: top-N heapsort Memory: 27kB
  • Buffers: shared hit=50653 read=14537
3. 2.321 67.865 ↓ 48.3 8,208 1

Hash Join (cost=37.02..408.62 rows=170 width=153) (actual time=2.958..67.865 rows=8,208 loops=1)

  • Hash Cond: (articles_article.category_id = articles_category.id)
  • Buffers: shared hit=50653 read=14537
4. 7.780 65.485 ↓ 36.4 14,970 1

Nested Loop (cost=34.29..402.66 rows=411 width=157) (actual time=0.217..65.485 rows=14,970 loops=1)

  • Buffers: shared hit=50651 read=14537
5. 1.587 12.645 ↓ 36.3 15,020 1

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

  • Buffers: shared hit=1895 read=3128
6. 0.014 0.154 ↓ 1.3 4 1

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

  • Group Key: u0.id
  • Buffers: shared hit=6 read=10
7. 0.008 0.140 ↓ 1.3 4 1

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

  • Buffers: shared hit=6 read=10
8. 0.044 0.044 ↓ 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.040..0.044 rows=4 loops=1)

  • Index Cond: (article_id = 540956)
  • Buffers: shared hit=2 read=2
9. 0.088 0.088 ↑ 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.021..0.022 rows=1 loops=4)

  • Index Cond: (id = u1.tag_id)
  • Heap Fetches: 4
  • Buffers: shared hit=4 read=8
10. 10.904 10.904 ↓ 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.021..2.726 rows=3,755 loops=4)

  • Index Cond: (tag_id = u0.id)
  • Buffers: shared hit=1889 read=3118
11. 45.060 45.060 ↑ 1.0 1 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=1 loops=15,020)

  • Index Cond: (id = articles_article_tags.article_id)
  • Filter: ((NOT is_draft) AND (NOT is_hidden) AND (id <> 540956) AND (published_at < now()))
  • Rows Removed by Filter: 0
  • Buffers: shared hit=48756 read=11409
12. 0.012 0.059 ↓ 1.1 18 1

Hash (cost=2.51..2.51 rows=17 width=4) (actual time=0.059..0.059 rows=18 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
  • Buffers: shared hit=2
13. 0.047 0.047 ↓ 1.1 18 1

Seq Scan on articles_category (cost=0.00..2.51 rows=17 width=4) (actual time=0.019..0.047 rows=18 loops=1)

  • Filter: ((lang)::text = 'ru'::text)
  • Rows Removed by Filter: 26
  • Buffers: shared hit=2