explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 9OUg

Settings
# exclusive inclusive rows x rows loops node
1. 3.550 321.253 ↑ 1.0 1 1

Aggregate (cost=10,970.28..10,970.29 rows=1 width=32) (actual time=321.253..321.253 rows=1 loops=1)

2.          

CTE lp

3. 0.030 0.088 ↓ 1.5 6 1

Nested Loop (cost=4.89..28.81 rows=4 width=16) (actual time=0.026..0.088 rows=6 loops=1)

4. 0.005 0.028 ↓ 1.5 6 1

Nested Loop (cost=4.61..26.91 rows=4 width=8) (actual time=0.019..0.028 rows=6 loops=1)

5. 0.009 0.009 ↑ 1.0 1 1

Index Scan using idx_access_profile_user_id on access_profile (cost=0.29..8.30 rows=1 width=4) (actual time=0.008..0.009 rows=1 loops=1)

  • Index Cond: (user_id = 13)
6. 0.010 0.014 ↓ 1.5 6 1

Bitmap Heap Scan on access_legal_person alp (cost=4.32..18.57 rows=4 width=12) (actual time=0.008..0.014 rows=6 loops=1)

  • Recheck Cond: (access_profile_id = access_profile.id)
  • Heap Blocks: exact=1
7. 0.004 0.004 ↓ 1.5 6 1

Bitmap Index Scan on idx_access_legal_person_prof_id_lp_id (cost=0.00..4.32 rows=4 width=0) (actual time=0.004..0.004 rows=6 loops=1)

  • Index Cond: (access_profile_id = access_profile.id)
8. 0.030 0.030 ↑ 1.0 1 6

Index Scan using legal_person_pkey on legal_person (cost=0.29..0.47 rows=1 width=16) (actual time=0.005..0.005 rows=1 loops=6)

  • Index Cond: (id = alp.legal_person_id)
9. 297.929 317.703 ↓ 1.6 2,003 1

Nested Loop Left Join (cost=0.42..10,900.75 rows=1,253 width=524) (actual time=0.178..317.703 rows=2,003 loops=1)

  • Join Filter: (egaisact_status(egais_act.*) = es.id)
  • Rows Removed by Join Filter: 36054
10. 0.476 13.765 ↓ 1.6 2,003 1

Nested Loop (cost=0.42..4,590.66 rows=1,253 width=787) (actual time=0.041..13.765 rows=2,003 loops=1)

11. 0.095 0.095 ↓ 1.5 6 1

CTE Scan on lp (cost=0.00..0.08 rows=4 width=8) (actual time=0.028..0.095 rows=6 loops=1)

12. 13.194 13.194 ↓ 1.1 334 6

Index Scan using idx_egais_act_legal_person_id_number on egais_act (cost=0.42..1,144.51 rows=313 width=795) (actual time=0.006..2.199 rows=334 loops=6)

  • Index Cond: (legal_person_id = lp.id)
13. 5.995 6.009 ↑ 1.0 19 2,003

Materialize (cost=0.00..1.28 rows=19 width=524) (actual time=0.000..0.003 rows=19 loops=2,003)

14. 0.014 0.014 ↑ 1.0 19 1

Seq Scan on egais_status es (cost=0.00..1.19 rows=19 width=524) (actual time=0.004..0.014 rows=19 loops=1)

Planning time : 0.618 ms
Execution time : 321.333 ms