explain.depesz.com

PostgreSQL's explain analyze made readable

Result: hivl

Settings
# exclusive inclusive rows x rows loops node
1. 18.518 46.750 ↑ 1.0 20 1

Subquery Scan on filtered_data (cost=1.53..352.34 rows=20 width=368) (actual time=3.548..46.750 rows=20 loops=1)

2. 0.015 28.232 ↑ 1.0 20 1

Limit (cost=1.53..341.94 rows=20 width=304) (actual time=2.462..28.232 rows=20 loops=1)

3. 0.028 28.217 ↑ 10.2 20 1

Subquery Scan on delegation_data (cost=1.53..3,473.74 rows=204 width=304) (actual time=2.460..28.217 rows=20 loops=1)

  • Filter: ((NOT delegation_data.is_workflow_closed) OR (delegation_data.is_workflow_closed IS NULL))
4. 23.520 28.189 ↑ 20.2 20 1

Nested Loop Left Join (cost=1.53..3,469.69 rows=405 width=304) (actual time=2.458..28.189 rows=20 loops=1)

  • Join Filter: (au1.id = du.user_id)
5. 0.052 4.649 ↑ 20.2 20 1

Nested Loop Left Join (cost=1.25..2,929.83 rows=405 width=102) (actual time=0.682..4.649 rows=20 loops=1)

6. 0.042 4.597 ↑ 20.2 20 1

Nested Loop Left Join (cost=0.97..2,346.79 rows=405 width=89) (actual time=0.680..4.597 rows=20 loops=1)

7. 4.262 4.475 ↑ 20.2 20 1

Nested Loop (cost=0.70..1,986.05 rows=405 width=54) (actual time=0.672..4.475 rows=20 loops=1)

  • Join Filter: (sourceidfromentityid(rg.entity_type_id, du.entity_id) IS NOT NULL)
8. 0.093 0.093 ↑ 20.4 20 1

Index Scan using domain_user_user_id_rg_id_entity_id_idx on domain_user du (cost=0.42..1,863.79 rows=407 width=16) (actual time=0.056..0.093 rows=20 loops=1)

  • Index Cond: ((user_id = 1251) AND (role_group_id = 2056))
  • Filter: (NOT entity_deleted)
9. 0.022 0.120 ↑ 1.0 1 20

Materialize (cost=0.27..15.43 rows=1 width=42) (actual time=0.004..0.006 rows=1 loops=20)

10. 0.001 0.098 ↑ 1.0 1 1

Nested Loop (cost=0.27..15.43 rows=1 width=42) (actual time=0.075..0.098 rows=1 loops=1)

11. 0.014 0.014 ↑ 1.0 1 1

Index Scan using pk_role_group on role_group rg (cost=0.27..8.32 rows=1 width=27) (actual time=0.013..0.014 rows=1 loops=1)

  • Index Cond: (id = 2056)
  • Filter: ((entity_type_id = 13) AND (client_id = 1005) AND (entity_type_id = ANY ('{1,61,12,13,14,15,16,17,28,18,63,67,80,165,176,181,64}'::integer[])))
12. 0.083 0.083 ↑ 1.0 1 1

Seq Scan on entity_type et (cost=0.00..7.10 rows=1 width=19) (actual time=0.061..0.083 rows=1 loops=1)

  • Filter: (is_workflow_entity AND (id = 13))
  • Rows Removed by Filter: 248
13. 0.080 0.080 ↓ 0.0 0 20

Index Scan using idx_delegated_domain_user_2 on delegated_domain_user ddu (cost=0.28..0.86 rows=3 width=39) (actual time=0.004..0.004 rows=0 loops=20)

  • Index Cond: (domain_user_id = du.id)
14. 0.000 0.000 ↓ 0.0 0 20

Index Scan using pk_app_user on app_user au2 (cost=0.28..1.43 rows=1 width=21) (actual time=0.000..0.000 rows=0 loops=20)

  • Index Cond: (id = ddu.delegated_user_id)
15. 0.010 0.020 ↑ 1.0 1 20

Materialize (cost=0.28..8.30 rows=1 width=21) (actual time=0.001..0.001 rows=1 loops=20)

16. 0.010 0.010 ↑ 1.0 1 1

Index Scan using pk_app_user on app_user au1 (cost=0.28..8.29 rows=1 width=21) (actual time=0.009..0.010 rows=1 loops=1)

  • Index Cond: (id = 1251)