explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Bppe

Settings
# exclusive inclusive rows x rows loops node
1. 0.024 0.241 ↑ 145.0 2 1

Sort (cost=6,631.46..6,632.19 rows=290 width=114) (actual time=0.240..0.241 rows=2 loops=1)

  • Sort Key: workflow_histories.id
  • Sort Method: quicksort Memory: 25kB
2. 0.005 0.217 ↑ 145.0 2 1

Nested Loop (cost=4,924.54..6,619.60 rows=290 width=114) (actual time=0.210..0.217 rows=2 loops=1)

3. 0.006 0.204 ↑ 100.0 2 1

HashAggregate (cost=4,924.10..4,926.10 rows=200 width=8) (actual time=0.203..0.204 rows=2 loops=1)

  • Group Key: r.id
4. 0.198 0.198 ↑ 560.3 3 1

CTE Scan on r (cost=4,869.47..4,903.09 rows=1,681 width=8) (actual time=0.090..0.198 rows=3 loops=1)

5.          

CTE r

6. 0.010 0.186 ↑ 560.3 3 1

Recursive Union (cost=0.88..4,869.47 rows=1,681 width=1,968) (actual time=0.085..0.186 rows=3 loops=1)

7. 0.006 0.098 ↑ 85.5 2 1

Nested Loop (cost=0.88..1,677.03 rows=171 width=1,968) (actual time=0.081..0.098 rows=2 loops=1)

8. 0.070 0.070 ↑ 85.5 2 1

Index Scan using index_workflow_histories_on_fiber_id on workflow_histories workflow_histories_2 (cost=0.44..229.52 rows=171 width=8) (actual time=0.059..0.070 rows=2 loops=1)

  • Index Cond: (fiber_id = 2643573)
9. 0.022 0.022 ↑ 1.0 1 2

Index Scan using workflow_histories_pkey on workflow_histories workflow_histories_1 (cost=0.44..8.46 rows=1 width=1,968) (actual time=0.011..0.011 rows=1 loops=2)

  • Index Cond: (id = workflow_histories_2.id)
10. 0.005 0.078 ↓ 0.0 0 2

Nested Loop (cost=0.56..315.88 rows=151 width=1,968) (actual time=0.038..0.039 rows=0 loops=2)

11. 0.004 0.004 ↑ 4.5 2 2

WorkTable Scan on r r_1 (cost=0.00..38.48 rows=9 width=8) (actual time=0.002..0.002 rows=2 loops=2)

  • Filter: (case_file_id = 304111)
12. 0.069 0.069 ↓ 0.0 0 3

Index Scan using index_workflow_histories_on_parent_history_id on workflow_histories workflow_histories_3 (cost=0.56..30.65 rows=17 width=1,968) (actual time=0.023..0.023 rows=0 loops=3)

  • Index Cond: (parent_history_id = r_1.id)
13. 0.008 0.008 ↑ 1.0 1 2

Index Scan using workflow_histories_pkey on workflow_histories (cost=0.44..8.46 rows=1 width=114) (actual time=0.004..0.004 rows=1 loops=2)

  • Index Cond: (id = r.id)
  • Filter: (case_file_id = 304111)
Planning time : 7.993 ms
Execution time : 0.369 ms