explain.depesz.com

PostgreSQL's explain analyze made readable

Result: KsS0

Settings
# exclusive inclusive rows x rows loops node
1. 0.016 0.646 ↑ 8.0 1 1

Sort (cost=301.50..301.52 rows=8 width=1,563) (actual time=0.646..0.646 rows=1 loops=1)

  • Sort Key: tasks_paginated.create_time_ DESC
  • Sort Method: quicksort Memory: 25kB
2.          

CTE tasks

3. 0.215 0.514 ↓ 2.8 153 1

HashAggregate (cost=233.01..233.56 rows=55 width=1,479) (actual time=0.461..0.514 rows=153 loops=1)

  • Group Key: task.proc_inst_id_, task.proc_def_id_, task.id_, task.name_, task.task_def_key_, task.create_time_, (true)
4. 0.022 0.299 ↓ 2.8 153 1

Append (cost=4.61..232.04 rows=55 width=1,479) (actual time=0.075..0.299 rows=153 loops=1)

5. 0.000 0.015 ↓ 0.0 0 1

Nested Loop (cost=4.61..61.84 rows=5 width=144) (actual time=0.015..0.015 rows=0 loops=1)

6. 0.001 0.015 ↓ 0.0 0 1

Bitmap Heap Scan on act_ru_identitylink (cost=4.32..20.30 rows=5 width=6) (actual time=0.015..0.015 rows=0 loops=1)

  • Recheck Cond: ((user_id_)::text = '1'::text)
  • Filter: ((type_)::text = 'candidate'::text)
7. 0.014 0.014 ↓ 0.0 0 1

Bitmap Index Scan on act_idx_ident_lnk_user (cost=0.00..4.32 rows=5 width=0) (actual time=0.014..0.014 rows=0 loops=1)

  • Index Cond: ((user_id_)::text = '1'::text)
8. 0.000 0.000 ↓ 0.0 0

Index Scan using act_ru_task_pkey on act_ru_task task (cost=0.29..8.31 rows=1 width=143) (never executed)

  • Index Cond: ((id_)::text = (act_ru_identitylink.task_id_)::text)
9. 0.228 0.262 ↓ 3.1 153 1

Bitmap Heap Scan on act_ru_task task_1 (cost=4.68..169.38 rows=50 width=144) (actual time=0.059..0.262 rows=153 loops=1)

  • Recheck Cond: ((assignee_)::text = '1'::text)
  • Heap Blocks: exact=153
10. 0.034 0.034 ↓ 3.1 153 1

Bitmap Index Scan on act_idx_task_assignee (cost=0.00..4.67 rows=50 width=0) (actual time=0.034..0.034 rows=153 loops=1)

  • Index Cond: ((assignee_)::text = '1'::text)
11.          

CTE tasks_filtered

12. 0.000 0.613 ↓ 0.0 0 1

Nested Loop Left Join (cost=0.42..18.14 rows=2 width=1,487) (actual time=0.613..0.613 rows=0 loops=1)

13. 0.613 0.613 ↓ 0.0 0 1

CTE Scan on tasks (cost=0.00..1.24 rows=2 width=1,479) (actual time=0.613..0.613 rows=0 loops=1)

  • Filter: ((proc_def_id_)::text ~~ ANY ('{abc,def}'::text[]))
  • Rows Removed by Filter: 153
14. 0.000 0.000 ↓ 0.0 0

Index Scan using act_hi_varinst_aysist_execution_id_name_index on act_hi_varinst cost_center (cost=0.42..8.44 rows=1 width=14) (never executed)

  • Index Cond: (((execution_id_)::text = (tasks.proc_inst_id_)::text) AND ((name_)::text = 'brId'::text))
15.          

CTE task_count

16. 0.003 0.616 ↑ 1.0 1 1

Aggregate (cost=0.04..0.06 rows=1 width=8) (actual time=0.616..0.616 rows=1 loops=1)

17. 0.613 0.613 ↓ 0.0 0 1

CTE Scan on tasks_filtered (cost=0.00..0.04 rows=2 width=0) (actual time=0.613..0.613 rows=0 loops=1)

18.          

CTE tasks_paginated

19. 0.010 0.010 ↓ 0.0 0 1

Sort (cost=0.05..0.06 rows=2 width=1,487) (actual time=0.010..0.010 rows=0 loops=1)

  • Sort Key: tasks_filtered_1.active DESC, tasks_filtered_1.create_time_ DESC
  • Sort Method: quicksort Memory: 25kB
20. 0.000 0.000 ↓ 0.0 0 1

CTE Scan on tasks_filtered tasks_filtered_1 (cost=0.00..0.04 rows=2 width=1,487) (actual time=0.000..0.000 rows=0 loops=1)

21. 0.002 0.630 ↑ 8.0 1 1

Nested Loop Left Join (cost=8.88..49.57 rows=8 width=1,563) (actual time=0.630..0.630 rows=1 loops=1)

22. 0.617 0.617 ↑ 1.0 1 1

CTE Scan on task_count (cost=0.00..0.02 rows=1 width=8) (actual time=0.617..0.617 rows=1 loops=1)

23. 0.000 0.011 ↓ 0.0 0 1

Nested Loop Left Join (cost=8.88..49.47 rows=8 width=1,555) (actual time=0.011..0.011 rows=0 loops=1)

24. 0.011 0.011 ↓ 0.0 0 1

CTE Scan on tasks_paginated (cost=0.00..0.04 rows=2 width=1,333) (actual time=0.011..0.011 rows=0 loops=1)

25. 0.000 0.000 ↓ 0.0 0

Bitmap Heap Scan on act_hi_varinst (cost=8.88..24.68 rows=4 width=234) (never executed)

  • Recheck Cond: (((task_id_)::text = (tasks_paginated.id_)::text) OR ((task_id_ IS NULL) AND ((execution_id_)::text = (tasks_paginated.proc_inst_id_)::text)))
26. 0.000 0.000 ↓ 0.0 0

BitmapOr (cost=8.88..8.88 rows=4 width=0) (never executed)

27. 0.000 0.000 ↓ 0.0 0

Bitmap Index Scan on act_hi_varinst_aysist_task_id_execution_id_index (cost=0.00..4.43 rows=1 width=0) (never executed)

  • Index Cond: ((task_id_)::text = (tasks_paginated.id_)::text)
28. 0.000 0.000 ↓ 0.0 0

Bitmap Index Scan on act_hi_varinst_aysist_task_id_execution_id_index (cost=0.00..4.45 rows=3 width=0) (never executed)

  • Index Cond: ((task_id_ IS NULL) AND ((execution_id_)::text = (tasks_paginated.proc_inst_id_)::text))
Planning time : 1.320 ms
Execution time : 0.785 ms