explain.depesz.com

PostgreSQL's explain analyze made readable

Result: ABWxa

Settings
# exclusive inclusive rows x rows loops node
1. 0.060 1.342 ↑ 5.7 16 1

Sort (cost=1,653.06..1,653.28 rows=91 width=240) (actual time=1.341..1.342 rows=16 loops=1)

  • Sort Key: (count(DISTINCT c.id)) DESC
  • Sort Method: quicksort Memory: 33kB
2. 0.125 1.282 ↑ 5.7 16 1

GroupAggregate (cost=1,648.27..1,650.09 rows=91 width=240) (actual time=1.213..1.282 rows=16 loops=1)

  • Group Key: a.id
  • Filter: (count(DISTINCT c.id) > 0)
3. 0.184 1.157 ↓ 1.1 96 1

Sort (cost=1,648.27..1,648.50 rows=91 width=240) (actual time=1.137..1.157 rows=96 loops=1)

  • Sort Key: a.id
  • Sort Method: quicksort Memory: 74kB
4. 0.028 0.973 ↓ 1.1 96 1

Nested Loop (cost=1.13..1,645.31 rows=91 width=240) (actual time=0.080..0.973 rows=96 loops=1)

5. 0.076 0.561 ↑ 1.0 96 1

Nested Loop (cost=0.84..912.35 rows=97 width=244) (actual time=0.062..0.561 rows=96 loops=1)

6. 0.097 0.097 ↑ 1.1 97 1

Index Scan using herald_comment_published_date_218eaca2 on herald_comment c (cost=0.42..34.98 rows=110 width=28) (actual time=0.027..0.097 rows=97 loops=1)

  • Index Cond: (published_date > '2019-10-28 15:04:28.055628+00'::timestamp with time zone)
  • Filter: ((workflow_state)::text = 'visible'::text)
7. 0.388 0.388 ↑ 1.0 1 97

Index Scan using herald_article_pkey on herald_article a (cost=0.42..7.97 rows=1 width=232) (actual time=0.004..0.004 rows=1 loops=97)

  • Index Cond: (id = c.article_id)
  • Filter: ((workflow_state)::text = ANY ('{published,released,recommended}'::text[]))
  • Rows Removed by Filter: 0
8. 0.384 0.384 ↑ 1.0 1 96

Index Scan using herald_user_pkey on herald_user u (cost=0.29..7.55 rows=1 width=4) (actual time=0.003..0.004 rows=1 loops=96)

  • Index Cond: (id = c.user_id)
  • Filter: ((workflow_state)::text = ANY ('{active,suspended}'::text[]))
Planning time : 1.539 ms
Execution time : 1.594 ms