explain.depesz.com

PostgreSQL's explain analyze made readable

Result: EBhB : Optimization for: plan #A8Aa

Settings

Optimization path:

# exclusive inclusive rows x rows loops node
1. 18.591 3,568.589 ↑ 4.7 69 1

HashAggregate (cost=30,007.41..30,017.87 rows=322 width=100) (actual time=3,568.518..3,568.589 rows=69 loops=1)

  • Group Key: content_comment.content_id
2. 4.155 3,549.998 ↓ 3.5 13,162 1

Nested Loop (cost=72.30..29,912.63 rows=3,791 width=100) (actual time=82.232..3,549.998 rows=13,162 loops=1)

3. 0.226 76.643 ↑ 1.0 100 1

HashAggregate (cost=71.88..72.88 rows=100 width=58) (actual time=76.526..76.643 rows=100 loops=1)

  • Group Key: ("ANY_subquery".id)::text
4. 0.050 76.417 ↑ 1.0 100 1

Subquery Scan on ANY_subquery (cost=0.00..71.63 rows=100 width=58) (actual time=0.111..76.417 rows=100 loops=1)

5. 0.021 76.367 ↑ 1.0 100 1

Limit (cost=0.00..70.63 rows=100 width=58) (actual time=0.110..76.367 rows=100 loops=1)

6. 76.346 76.346 ↑ 748.6 100 1

Seq Scan on content (cost=0.00..52,873.64 rows=74,858 width=58) (actual time=0.108..76.346 rows=100 loops=1)

  • Filter: ((data_source_id)::text = 'UCNye-wNBqNL5ZzHSJj3l8Bg'::text)
  • Rows Removed by Filter: 7669
7. 3,469.200 3,469.200 ↓ 3.5 132 100

Index Scan using content_comment_data_source_and_content_id on content_comment (cost=0.42..298.02 rows=38 width=100) (actual time=3.600..34.692 rows=132 loops=100)

  • Index Cond: (((data_source_id)::text = 'UCNye-wNBqNL5ZzHSJj3l8Bg'::text) AND ((content_id)::text = ("ANY_subquery".id)::text))
  • Filter: ((language)::text = ANY ('{en,ps,ur,ur-pk,en-pk,brh,pa,sd}'::text[]))
  • Rows Removed by Filter: 21
Planning time : 1.146 ms
Execution time : 3,568.790 ms