explain.depesz.com

PostgreSQL's explain analyze made readable

Result: cQij : Optimization for: plan #FKa

Settings

Optimization path:

# exclusive inclusive rows x rows loops node
1. 0.000 0.000 ↓ 0.0

Sort (cost=3,817.26..3,817.26 rows=2 width=230) (actual rows= loops=)

  • Sort Key: sjadministre.s_nom_pour_tri, mandat.d_ouverture
2. 0.000 0.000 ↓ 0.0

Nested Loop (cost=3.58..3,817.25 rows=2 width=230) (actual rows= loops=)

  • Join Filter: (((sjadministre.s_nom)::text ~* '^(ç|c)h(à|a|ä|â)'::text) OR ((mandat.s_num_greffe)::text ~* '^(ç|c)h(à|a|ä|â)'::text) OR ((mandat.s_num_mandat)::text ~* '^(ç|c)h(à|a|ä|â)'::text) OR ((mandat.s_num_archive)::text ~* '^(ç|c)h(à|a|ä|â)'::text) OR ((societe.s_enseigne)::text ~* '^(ç|c)h(à|a|ä|â)'::text) OR ((societe.s_sigle)::text ~* '^(ç|c)h(à|a|ä|â)'::text))
3. 0.000 0.000 ↓ 0.0

Merge Join (cost=3.29..3,293.14 rows=1,548 width=254) (actual rows= loops=)

  • Merge Cond: (sjjuridiction.i_juridiction = juridiction.i_juridiction)
4. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=1.55..5,092,545.83 rows=1,548 width=257) (actual rows= loops=)

5. 0.000 0.000 ↓ 0.0

Nested Loop (cost=1.13..5,084,125.10 rows=1,548 width=240) (actual rows= loops=)

6. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.71..5,075,704.37 rows=1,548 width=195) (actual rows= loops=)

  • Join Filter: (mandat.i_mission_professionnel = missionprofessionnel.i_mission_professionnel)
7. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.71..5,074,983.16 rows=1,548 width=151) (actual rows= loops=)

8. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.42..5,072,567.54 rows=1,548 width=95) (actual rows= loops=)

  • Join Filter: (mandat.i_sj_juridiction = sjjuridiction.i_structure_juridique)
9. 0.000 0.000 ↓ 0.0

Index Scan using idx_sj_juridiction on structure_juridique sjjuridiction (cost=0.42..21,142.85 rows=217,462 width=42) (actual rows= loops=)

10. 0.000 0.000 ↓ 0.0

Materialize (cost=0.00..1,960.92 rows=1,548 width=69) (actual rows= loops=)

11. 0.000 0.000 ↓ 0.0

Seq Scan on mandat (cost=0.00..1,953.18 rows=1,548 width=69) (actual rows= loops=)

  • Filter: (d_cloture IS NULL)
12. 0.000 0.000 ↓ 0.0

Index Scan using mandat_idx_i_date_mandat on date_mandat datemandat (cost=0.29..1.55 rows=1 width=64) (actual rows= loops=)

  • Index Cond: (i_date_mandat = mandat.i_date_mandat)
13. 0.000 0.000 ↓ 0.0

Materialize (cost=0.00..1.47 rows=31 width=52) (actual rows= loops=)

14. 0.000 0.000 ↓ 0.0

Seq Scan on mission_professionnel missionprofessionnel (cost=0.00..1.31 rows=31 width=52) (actual rows= loops=)

15. 0.000 0.000 ↓ 0.0

Index Scan using pk_structure_juridique on structure_juridique sjadministre (cost=0.42..5.43 rows=1 width=61) (actual rows= loops=)

  • Index Cond: (i_structure_juridique = mandat.i_sj_administre)
16. 0.000 0.000 ↓ 0.0

Index Scan using pk_structure_juridique on structure_juridique sjcollaborateurprincipal (cost=0.42..5.43 rows=1 width=33) (actual rows= loops=)

  • Index Cond: (mandat.i_sj_collaborateur_principal = i_structure_juridique)
17. 0.000 0.000 ↓ 0.0

Sort (cost=1.71..1.77 rows=22 width=13) (actual rows= loops=)

  • Sort Key: juridiction.i_juridiction
18. 0.000 0.000 ↓ 0.0

Seq Scan on juridiction (cost=0.00..1.22 rows=22 width=13) (actual rows= loops=)

19. 0.000 0.000 ↓ 0.0

Index Scan using pk_societe on societe (cost=0.29..0.31 rows=1 width=13) (actual rows= loops=)