explain.depesz.com

PostgreSQL's explain analyze made readable

Result: e7Ym

Settings
# exclusive inclusive rows x rows loops node
1. 0.017 1,083.840 ↑ 1.0 1 1

Aggregate (cost=20.62..20.63 rows=1 width=8) (actual time=1,083.839..1,083.840 rows=1 loops=1)

2. 0.001 1,083.823 ↓ 0.0 0 1

Nested Loop Semi Join (cost=3.65..20.62 rows=1 width=4) (actual time=1,083.823..1,083.823 rows=0 loops=1)

3. 0.003 1,083.822 ↓ 0.0 0 1

Merge Join (cost=3.22..19.81 rows=1 width=8) (actual time=1,083.821..1,083.822 rows=0 loops=1)

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

Nested Loop (cost=0.71..281,033.73 rows=84,916 width=8) (actual time=1,083.819..1,083.819 rows=0 loops=1)

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

Nested Loop (cost=0.71..114,450.29 rows=2 width=8) (actual time=1,083.817..1,083.818 rows=0 loops=1)

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

Index Scan using idx_domain_user_entity_id_role_group_id on domain_user du (cost=0.43..114,425.76 rows=189 width=8) (actual time=1,083.815..1,083.816 rows=0 loops=1)

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

Materialize (cost=0.28..7.54 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.51 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,243.58 rows=868,439 width=20) (never executed)

10. 0.000 0.000 ↓ 0.0 0

Seq Scan on work_flow_task_configuration wftc (cost=0.00..110,812.39 rows=868,439 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..4.11 rows=19 width=4) (never executed)

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