explain.depesz.com

PostgreSQL's explain analyze made readable

Result: UsKW

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 2,175.962 ↑ 245.0 1 1

GroupAggregate (cost=1,653.11..385,718.09 rows=245 width=53) (actual time=2,175.961..2,175.962 rows=1 loops=1)

  • Group Key: posts.group_uuid
2. 3.164 2,176.235 ↓ 4.3 1,043 1

Gather (cost=1,653.11..385,713.81 rows=245 width=45) (actual time=63.426..2,176.235 rows=1,043 loops=1)

  • Workers Planned: 4
  • Workers Launched: 0
3. 325.914 2,173.071 ↓ 17.1 1,043 1

Nested Loop Left Join (cost=653.11..384,689.31 rows=61 width=45) (actual time=62.236..2,173.071 rows=1,043 loops=1)

  • Filter: (((comments.id IS NULL) OR ((NOT comments.is_deleted) AND (NOT comments.invisible))) AND ((comments.created_at > '2020-06-20 22:05:58.733753'::timestamp without time zone) OR ((posts.date >= '2020-06-20 22:05:58.733753'::timestamp without time zone) AND (posts.date <= '2020-06-22 22:05:58.746503'::timestamp without time zone))))
  • Rows Removed by Filter: 181,176
4. 337.097 367.613 ↓ 4.8 32,164 1

Parallel Bitmap Heap Scan on posts (cost=652.54..30,658.39 rows=6,744 width=49) (actual time=60.602..367.613 rows=32,164 loops=1)

  • Recheck Cond: ((group_uuid)::text = '782b6b62-4fc4-4437-b784-cc17c98e6530'::text)
  • Filter: ((NOT is_deleted) AND (NOT invisible))
  • Rows Removed by Filter: 1,555
  • Heap Blocks: exact=32,834
5. 30.516 30.516 ↓ 1.1 33,719 1

Bitmap Index Scan on index_posts_group_uuid_total_likes_partial (cost=0.00..645.79 rows=30,032 width=0) (actual time=30.516..30.516 rows=33,719 loops=1)

  • Index Cond: ((group_uuid)::text = '782b6b62-4fc4-4437-b784-cc17c98e6530'::text)
6. 1,479.544 1,479.544 ↑ 22.0 6 32,164

Index Scan using index_comments_on_post_id_and_is_deleted_and_invisible on comments (cost=0.57..50.19 rows=132 width=18) (actual time=0.025..0.046 rows=6 loops=32,164)

  • Index Cond: (post_id = posts.id)
Planning time : 2.183 ms
Execution time : 2,177.246 ms