explain.depesz.com

PostgreSQL's explain analyze made readable

Result: F0xU

Settings
# exclusive inclusive rows x rows loops node
1. 3.618 320.188 ↑ 1.0 1 1

Aggregate (cost=10,933.43..10,933.44 rows=1 width=32) (actual time=320.188..320.188 rows=1 loops=1)

2.          

CTE lp

3. 0.024 0.074 ↓ 1.5 6 1

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

4. 0.006 0.026 ↓ 1.5 6 1

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

5. 0.008 0.008 ↑ 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.008 rows=1 loops=1)

  • Index Cond: (user_id = 13)
6. 0.008 0.012 ↓ 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.012 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.024 0.024 ↑ 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.004..0.004 rows=1 loops=6)

  • Index Cond: (id = alp.legal_person_id)
9. 296.584 316.570 ↓ 16.8 2,003 1

Nested Loop (cost=0.42..10,900.75 rows=119 width=524) (actual time=0.176..316.570 rows=2,003 loops=1)

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

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

11. 0.081 0.081 ↓ 1.5 6 1

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

12. 13.410 13.410 ↓ 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.235 rows=334 loops=6)

  • Index Cond: (legal_person_id = lp.id)
13. 6.000 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.009 0.009 ↑ 1.0 19 1

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