explain.depesz.com

PostgreSQL's explain analyze made readable

Result: ytCP

Settings
# exclusive inclusive rows x rows loops node
1. 0.054 1,189.576 ↑ 1.0 1 1

Aggregate (cost=24.91..24.92 rows=1 width=8) (actual time=1,189.575..1,189.576 rows=1 loops=1)

2.          

Initplan (for Aggregate)

3. 0.002 0.002 ↓ 0.0 0 1

Result (cost=0.00..0.00 rows=0 width=0) (actual time=0.001..0.002 rows=0 loops=1)

  • One-Time Filter: false
4. 0.002 1,189.520 ↓ 0.0 0 1

Nested Loop Semi Join (cost=3.65..24.91 rows=1 width=4) (actual time=1,189.519..1,189.520 rows=0 loops=1)

5. 0.003 1,189.518 ↓ 0.0 0 1

Merge Join (cost=3.22..24.12 rows=1 width=8) (actual time=1,189.517..1,189.518 rows=0 loops=1)

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

Nested Loop (cost=0.71..371,418.33 rows=214,124 width=8) (actual time=1,189.514..1,189.515 rows=0 loops=1)

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

Nested Loop (cost=0.71..123,182.90 rows=5 width=8) (actual time=1,189.512..1,189.513 rows=0 loops=1)

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

Index Scan using idx_domain_user_entity_id_role_group_id on domain_user du (cost=0.43..123,128.19 rows=525 width=8) (actual time=1,189.510..1,189.511 rows=0 loops=1)

  • Filter: ((NOT entity_deleted) AND ((user_id = 4,889) OR (user_group_id = $0)))
  • Rows Removed by Filter: 3,482,129
9. 0.000 0.000 ↓ 0.0 0

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

10. 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
11. 0.000 0.000 ↓ 0.0 0

Materialize (cost=0.00..120,400.18 rows=875,945 width=20) (never executed)

12. 0.000 0.000 ↓ 0.0 0

Seq Scan on work_flow_task_configuration wftc (cost=0.00..110,887.45 rows=875,945 width=20) (never executed)

13. 0.000 0.000 ↓ 0.0 0

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

  • Sort Key: et.id
14. 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))
15. 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)

16. 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
17. 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[])))
18. 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 : 3.815 ms
Execution time : 1,190.602 ms