explain.depesz.com

PostgreSQL's explain analyze made readable

Result: uFVL

Settings
# exclusive inclusive rows x rows loops node
1. 0.028 1,035.723 ↑ 1.0 1 1

Aggregate (cost=20.44..20.45 rows=1 width=8) (actual time=1,035.722..1,035.723 rows=1 loops=1)

2. 0.002 1,035.695 ↓ 0.0 0 1

Nested Loop Semi Join (cost=3.65..20.44 rows=1 width=4) (actual time=1,035.694..1,035.695 rows=0 loops=1)

3. 0.002 1,035.693 ↓ 0.0 0 1

Merge Join (cost=3.22..19.65 rows=1 width=8) (actual time=1,035.693..1,035.693 rows=0 loops=1)

  • Merge Cond: (du.entity_id = et.id)
  • Join Filter: (wftc.task_id = ANY (et.next_manual_task_ids))
4. 0.002 1,035.691 ↓ 0.0 0 1

Nested Loop (cost=0.71..280,995.87 rows=85,732 width=8) (actual time=1,035.690..1,035.691 rows=0 loops=1)

  • Join Filter: (du.role_group_id = ANY (wftc.task_owners))
5. 0.002 1,035.689 ↓ 0.0 0 1

Nested Loop (cost=0.71..113,792.56 rows=2 width=8) (actual time=1,035.689..1,035.689 rows=0 loops=1)

  • Join Filter: (rg.id = du.role_group_id)
6. 1,035.687 1,035.687 ↓ 0.0 0 1

Index Scan using idx_domain_user_entity_id_role_group_id on domain_user du (cost=0.43..113,768.32 rows=186 width=8) (actual time=1,035.686..1,035.687 rows=0 loops=1)

  • Filter: ((NOT entity_deleted) AND ((user_id = 4,889) OR (user_group_id = ANY ('{}'::integer[]))))
  • Rows Removed by Filter: 3,463,222
7. 0.000 0.000 ↓ 0.0 0

Materialize (cost=0.28..7.52 rows=6 width=4) (never executed)

8. 0.000 0.000 ↓ 0.0 0

Index Scan using idx_role_group_entity_type_id on role_group rg (cost=0.28..7.49 rows=6 width=4) (never executed)

  • Index Cond: (entity_type_id = 80)
  • Filter: grant_access_on_assign
9. 0.000 0.000 ↓ 0.0 0

Materialize (cost=0.00..120,417.83 rows=876,789 width=20) (never executed)

10. 0.000 0.000 ↓ 0.0 0

Seq Scan on work_flow_task_configuration wftc (cost=0.00..110,895.89 rows=876,789 width=20) (never executed)

11. 0.000 0.000 ↓ 0.0 0

Sort (cost=2.51..2.52 rows=1 width=33) (never executed)

  • Sort Key: et.id
12. 0.000 0.000 ↓ 0.0 0

Merge Right Join (cost=1.88..2.50 rows=1 width=33) (never executed)

  • Merge Cond: (tz.id = et.time_zone_id)
  • Filter: ((et.planned_completion_date IS NULL) OR ((change_tz(et.planned_completion_date, 'UTC'::character varying, tz.time_zone))::date <= (change_tz(now(), 'UTC'::character varying, tz.time_zone))::date))
13. 0.000 0.000 ↓ 0.0 0

Index Scan using pk_time_zone on time_zone tz (cost=0.14..4.06 rows=41 width=20) (never executed)

14. 0.000 0.000 ↓ 0.0 0

Sort (cost=1.15..1.16 rows=1 width=45) (never executed)

  • Sort Key: et.time_zone_id
15. 0.000 0.000 ↓ 0.0 0

Seq Scan on work_order_request et (cost=0.00..1.14 rows=1 width=45) (never executed)

  • Filter: ((NOT deleted) AND (system_status <> ALL ('{}'::integer[])) AND ((NOT workflow_close) OR (workflow_close IS NULL)) AND (client_id = 1,004) AND (system_status <> ALL ('{1,2,5,6}'::integer[])))
16. 0.000 0.000 ↓ 0.0 0

Index Scan using idx_work_flow_task_condition_2 on work_flow_task_condition (cost=0.43..3.96 rows=20 width=4) (never executed)

  • Index Cond: (task_id = et.work_flow_task_id)
  • Filter: (next_task_id IS NOT NULL)
Planning time : 1.398 ms
Execution time : 1,035.849 ms