explain.depesz.com

PostgreSQL's explain analyze made readable

Result: wC6H

Settings
# exclusive inclusive rows x rows loops node
1. 1,238.915 12,725.276 ↓ 246.0 654,947 1

Hash Join (cost=66,307.73..133,783.73 rows=2,662 width=119) (actual time=11,230.480..12,725.276 rows=654,947 loops=1)

  • Hash Cond: (((dos_gam.da_num)::integer)::numeric = rintervention.num_dossier)
2. 300.049 300.049 ↑ 1.0 2,084,620 1

Seq Scan on dos_gam (cost=0.00..51,794.75 rows=2,084,620 width=14) (actual time=0.011..300.049 rows=2,084,620 loops=1)

  • Filter: (id_autorite = 38012)
3. 243.302 11,186.312 ↓ 2,170.1 655,376 1

Hash (cost=66,303.95..66,303.95 rows=302 width=52) (actual time=11,186.312..11,186.312 rows=655,376 loops=1)

  • Buckets: 1048576 (originally 1024) Batches: 1 (originally 1) Memory Usage: 67420kB
4. 1,962.198 10,943.010 ↓ 2,170.1 655,376 1

Gather (cost=2,070.90..66,303.95 rows=302 width=52) (actual time=17.023..10,943.010 rows=655,376 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
5. 144.141 8,980.812 ↓ 1,733.8 218,459 3 / 3

Nested Loop Left Join (cost=1,070.90..65,273.75 rows=126 width=52) (actual time=12.884..8,980.812 rows=218,459 loops=3)

  • Join Filter: ((racte.date_execution >= medecin_executant_acte.date_debut_presence) AND (racte.date_execution <= medecin_executant_acte.date_fin_presence))
  • Rows Removed by Join Filter: 940695
6. 71.204 7,744.378 ↓ 1,733.8 218,459 3 / 3

Hash Left Join (cost=1,070.49..65,216.62 rows=126 width=54) (actual time=12.799..7,744.378 rows=218,459 loops=3)

  • Hash Cond: ((racte_executants.uf_executante)::text = elt_struct_uf_realisatrice.client_code)
7. 70.806 7,670.866 ↓ 1,733.8 218,459 3 / 3

Nested Loop Left Join (cost=1.73..64,113.83 rows=126 width=55) (actual time=10.387..7,670.866 rows=218,459 loops=3)

8. 225.974 6,507.767 ↓ 1,733.8 218,459 3 / 3

Nested Loop (cost=1.29..64,006.32 rows=126 width=44) (actual time=10.351..6,507.767 rows=218,459 loops=3)

9. 251.262 5,626.417 ↓ 313.0 218,459 3 / 3

Nested Loop (cost=0.86..63,671.23 rows=698 width=53) (actual time=10.288..5,626.417 rows=218,459 loops=3)

10. 81.928 406.992 ↓ 280.1 621,020 3 / 3

Nested Loop (cost=0.43..61,834.17 rows=2,217 width=17) (actual time=9.004..406.992 rows=621,020 loops=3)

11. 10.083 10.083 ↓ 8.6 763 3 / 3

Parallel Seq Scan on elt_struct elt_struct_uf_demandeuse (cost=0.00..4,759.73 rows=89 width=12) (actual time=8.804..10.083 rows=763 loops=3)

  • Filter: ((entite_id = 38005) AND (elt_struct_type_code = 'UF'::text))
  • Rows Removed by Filter: 68023
12. 314.981 314.981 ↑ 10.8 814 2,288 / 3

Index Scan using rintervention_uf_demandeuse_idx on rintervention (cost=0.43..553.41 rows=8,788 width=21) (actual time=0.004..0.413 rows=814 loops=2,288)

  • Index Cond: ((uf_demandeuse)::text = elt_struct_uf_demandeuse.client_code)
13. 4,968.163 4,968.163 ↓ 0.0 0 1,863,061 / 3

Index Scan using racte_idintervention_idx on racte (cost=0.43..0.82 rows=1 width=42) (actual time=0.008..0.008 rows=0 loops=1,863,061)

  • Index Cond: (idintervention = rintervention.idintervention)
  • Filter: (((nomenclature)::text = 'C'::text) AND (actif = '1'::numeric))
  • Rows Removed by Filter: 3
14. 655.376 655.376 ↑ 1.0 1 655,376 / 3

Index Scan using ak_produit on produit produit_ccam (cost=0.43..0.47 rows=1 width=11) (actual time=0.003..0.003 rows=1 loops=655,376)

  • Index Cond: ((code = COALESCE((((((racte.code_acte_ccam)::text || '-'::text) || (racte.code_activite_ccam)::text) || '-'::text) || (racte.code_phase_ccam)::text))) AND (type = 'CCAM'::text))
15. 1,092.293 1,092.293 ↑ 1.0 1 655,376 / 3

Index Scan using racte_executants_idacte_idx on racte_executants (cost=0.43..0.84 rows=1 width=17) (actual time=0.005..0.005 rows=1 loops=655,376)

  • Index Cond: (racte.idacte = idacte)
16. 0.318 2.308 ↓ 10.7 2,288 3 / 3

Hash (cost=1,066.09..1,066.09 rows=214 width=12) (actual time=2.308..2.308 rows=2,288 loops=3)

  • Buckets: 4096 (originally 1024) Batches: 1 (originally 1) Memory Usage: 124kB
17. 0.626 1.990 ↓ 10.7 2,288 3 / 3

Bitmap Heap Scan on elt_struct elt_struct_uf_realisatrice (cost=383.65..1,066.09 rows=214 width=12) (actual time=1.377..1.990 rows=2,288 loops=3)

  • Recheck Cond: ((elt_struct_type_code = 'UF'::text) AND (entite_id = 38005))
  • Heap Blocks: exact=74
18. 0.011 1.364 ↓ 0.0 0 3 / 3

BitmapAnd (cost=383.65..383.65 rows=214 width=0) (actual time=1.364..1.364 rows=0 loops=3)

19. 0.230 0.230 ↑ 1.0 2,327 3 / 3

Bitmap Index Scan on idx_elt_struct_elt_struct_type_code (cost=0.00..46.68 rows=2,435 width=0) (actual time=0.230..0.230 rows=2,327 loops=3)

  • Index Cond: (elt_struct_type_code = 'UF'::text)
20. 1.123 1.123 ↓ 1.0 18,348 3 / 3

Bitmap Index Scan on idx_elt_struct_entite_id (cost=0.00..336.61 rows=18,159 width=0) (actual time=1.123..1.123 rows=18,348 loops=3)

  • Index Cond: (entite_id = 38005)
21. 1,092.293 1,092.293 ↓ 5.0 5 655,376 / 3

Index Scan using praticien_matricule_idx on praticien medecin_executant_acte (cost=0.42..0.44 rows=1 width=18) (actual time=0.003..0.005 rows=5 loops=655,376)

  • Index Cond: ((racte_executants.medecin_executant)::text = matricule)
  • Filter: (id_autorite = 38012)
Planning time : 2.240 ms
Execution time : 12,748.818 ms