explain.depesz.com

PostgreSQL's explain analyze made readable

Result: NRiU

Settings
# exclusive inclusive rows x rows loops node
1. 0.057 1,453.385 ↑ 1.0 1 1

Aggregate (cost=20.49..20.50 rows=1 width=8) (actual time=1,453.384..1,453.385 rows=1 loops=1)

  • Buffers: shared hit=851,345
2. 0.001 1,453.328 ↓ 0.0 0 1

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

  • Buffers: shared hit=851,341
3. 0.003 1,453.327 ↓ 0.0 0 1

Merge Join (cost=3.22..19.70 rows=1 width=8) (actual time=1,453.326..1,453.327 rows=0 loops=1)

  • Merge Cond: (du.entity_id = et.id)
  • Join Filter: (wftc.task_id = ANY (et.next_manual_task_ids))
  • Buffers: shared hit=851,341
4. 0.001 1,453.324 ↓ 0.0 0 1

Nested Loop (cost=0.71..281,587.86 rows=85,650 width=8) (actual time=1,453.324..1,453.324 rows=0 loops=1)

  • Join Filter: (du.role_group_id = ANY (wftc.task_owners))
  • Buffers: shared hit=851,341
5. 0.002 1,453.323 ↓ 0.0 0 1

Nested Loop (cost=0.71..114,447.30 rows=2 width=8) (actual time=1,453.322..1,453.323 rows=0 loops=1)

  • Join Filter: (rg.id = du.role_group_id)
  • Buffers: shared hit=851,341
6. 1,453.321 1,453.321 ↓ 0.0 0 1

Index Scan using idx_domain_user_entity_id_role_group_id on domain_user du (cost=0.43..114,422.41 rows=193 width=8) (actual time=1,453.320..1,453.321 rows=0 loops=1)

  • Filter: ((NOT entity_deleted) AND ((user_id = 4,889) OR (user_group_id = ANY ('{}'::integer[]))))
  • Rows Removed by Filter: 3,481,766
  • Buffers: shared hit=851,341
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,400.18 rows=875,945 width=20) (never executed)

10. 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)

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)