explain.depesz.com

PostgreSQL's explain analyze made readable

Result: E6l : Optimization for: Optimization for: Optimization for: Optimization for: Optimization for: plan #3nEs; plan #1n0G; plan #WD4N; plan #IqoE; plan #fB7S

Settings

Optimization path:

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 0.008 0.059 ↑ 2.0 10 1

Sort (cost=8,476.52..8,476.57 rows=20 width=76) (actual time=0.058..0.059 rows=10 loops=1)

  • Sort Key: ct.created_date DESC
  • Sort Method: quicksort Memory: 26kB
  • Planning time: 0.355 ms
  • Execution time: 0.109 ms
2.          

CTE ct

3. 0.009 0.046 ↑ 2.0 10 1

Recursive Union (cost=0.00..8,475.68 rows=20 width=77) (actual time=0.011..0.046 rows=10 loops=1)

4. 0.003 0.013 ↑ 1.0 10 1

Limit (cost=0.00..0.26 rows=10 width=77) (actual time=0.008..0.013 rows=10 loops=1)

5. 0.010 0.010 ↑ 200,000.0 10 1

Seq Scan on comment (cost=0.00..51,667.00 rows=2,000,000 width=77) (actual time=0.007..0.010 rows=10 loops=1)

  • Filter: ((parent_id IS NULL) AND (deleted_date IS NULL) AND (website_page_id = 1))
6. 0.003 0.024 ↓ 0.0 0 1

Nested Loop (cost=0.43..847.50 rows=1 width=77) (actual time=0.024..0.024 rows=0 loops=1)

7. 0.001 0.001 ↑ 10.0 10 1

WorkTable Scan on ct ct_1 (cost=0.00..2.00 rows=100 width=12) (actual time=0.001..0.001 rows=10 loops=1)

8. 0.020 0.020 ↓ 0.0 0 10

Index Scan using index_comment_parent_id on comment comment_1 (cost=0.43..8.45 rows=1 width=73) (actual time=0.002..0.002 rows=0 loops=10)

  • Index Cond: (parent_id = ct_1.id)
9. 0.051 0.051 ↑ 2.0 10 1

CTE Scan on ct (cost=0.00..0.40 rows=20 width=76) (actual time=0.012..0.051 rows=10 loops=1)