explain.depesz.com

PostgreSQL's explain analyze made readable

Result: af7O

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

Nested Loop Anti Join (cost=1,132.50..133,257.71 rows=1 width=618) (actual time=516.839..516.839 rows=0 loops=1)

  • Join Filter: (((versement6_.lib_statut)::text = ANY ('{NEW,A_VALIDE,VALIDE}'::text[])) OR (((versement6_.lib_statut)::text = 'PAS_VALIDABLE'::text) AND ((typeversem5_.code_tech_type_versement)::text = 'VER_DIR'::text)))
2. 0.033 516.839 ↓ 0.0 0 1

Nested Loop Semi Join (cost=1,130.66..133,254.85 rows=1 width=624) (actual time=516.839..516.839 rows=0 loops=1)

3. 0.091 516.624 ↑ 15.4 14 1

Hash Join (cost=1,129.76..132,835.43 rows=215 width=624) (actual time=75.568..516.624 rows=14 loops=1)

  • Hash Cond: (versement0_.id_type_versement = typeversem5_.id_type_versement)
4. 0.000 516.520 ↑ 15.4 14 1

Hash Join (cost=1,128.56..132,833.39 rows=215 width=618) (actual time=75.542..516.520 rows=14 loops=1)

  • Hash Cond: (versement0_.id_mandat_gestion = mandatgest1_.id_mandat_gestion)
  • Join Filter: ((((date(versement0_.dat_reversement) >= '2020-06-01'::date) AND (date(versement0_.dat_reversement) <= '2020-06-30'::date) AND ((mandatgest1_.lib_mandat_gestion_type)::text <> 'JUDICIAIRE'::text)) OR (((mandatgest1_.lib_mandat_gestion_type)::text = 'JUDICIAIRE'::text) AND ((dossiersta4_.code_dossier_status)::text = 'CLOS'::text) AND (date(statusperi3_.dat_date_debut) <= '2020-06-30'::date))) AND ((NOT mandatgest1_.boo_has_phase_tenant) OR (mandatgest1_.boo_has_phase_tenant AND (alternatives: SubPlan 1 or hashed SubPlan 2) AND (versement0_.dat_date >= (SubPlan 3)))))
5. 63.649 540.839 ↓ 3.1 58,987 1

Gather (cost=1,002.11..132,657.64 rows=18,783 width=636) (actual time=3.231..540.839 rows=58,987 loops=1)

  • Workers Planned: 4
  • Workers Launched: 4
6. 9.352 477.190 ↓ 2.5 11,797 5 / 5

Hash Join (cost=2.11..129,779.34 rows=4,696 width=636) (actual time=0.512..477.190 rows=11,797 loops=5)

  • Hash Cond: (statusperi3_.id_dossier_status = dossiersta4_.id_dossier_status)
7. 27.987 467.811 ↑ 1.5 21,320 5 / 5

Nested Loop (cost=0.99..129,639.69 rows=32,870 width=642) (actual time=0.204..467.811 rows=21,320 loops=5)

8. 10.004 290.584 ↑ 1.5 21,320 5 / 5

Nested Loop (cost=0.56..113,042.18 rows=32,870 width=634) (actual time=0.152..290.584 rows=21,320 loops=5)

9. 131.340 131.340 ↑ 1.5 21,320 5 / 5

Parallel Seq Scan on t_versement versement0_ (cost=0.00..86,406.73 rows=32,870 width=618) (actual time=0.069..131.340 rows=21,320 loops=5)

  • Filter: ((NOT boo_supprime) AND (NOT boo_en_migration) AND (NOT boo_facture_ae) AND (id_versement_annule IS NULL) AND (id_versement_impaye IS NULL) AND (date(dat_reversement) < '2020-07-01'::date) AND ((((lib_statut)::text = 'REVERSE'::text) AND (date(dat_reversement) < '2020-07-01'::date)) OR ((lib_statut)::text = 'AGREGE'::text)))
  • Rows Removed by Filter: 138,040
10. 149.240 149.240 ↑ 1.0 1 106,600 / 5

Index Only Scan using t_dossier_id_dossier_id_prestataire_id_status_idx on t_dossier dossier2_ (cost=0.56..0.81 rows=1 width=32) (actual time=0.007..0.007 rows=1 loops=106,600)

  • Index Cond: (id_dossier = versement0_.id_dossier)
  • Heap Fetches: 2,326
11. 149.240 149.240 ↑ 1.0 1 106,600 / 5

Index Scan using t_status_periodicite_pkey on t_status_periodicite statusperi3_ (cost=0.43..0.50 rows=1 width=40) (actual time=0.007..0.007 rows=1 loops=106,600)

  • Index Cond: (id_status_periodicite = dossier2_.id_status)
12. 0.004 0.027 ↑ 1.0 1 5 / 5

Hash (cost=1.10..1.10 rows=1 width=26) (actual time=0.027..0.027 rows=1 loops=5)

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
13. 0.023 0.023 ↑ 1.0 1 5 / 5

Seq Scan on t_dossier_status dossiersta4_ (cost=0.00..1.10 rows=1 width=26) (actual time=0.022..0.023 rows=1 loops=5)

  • Filter: (((code_dossier_status)::text <> 'EXCLU'::text) AND ((code_dossier_status)::text = 'CLOS'::text))
  • Rows Removed by Filter: 6
14. 0.119 1.356 ↓ 1.3 492 1

Hash (cost=121.75..121.75 rows=376 width=26) (actual time=1.356..1.356 rows=492 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 37kB
15. 1.237 1.237 ↓ 1.3 492 1

Seq Scan on t_mandat_gestion mandatgest1_ (cost=0.00..121.75 rows=376 width=26) (actual time=0.024..1.237 rows=492 loops=1)

  • Filter: (((lib_mandat_gestion_type)::text = 'JUDICIAIRE'::text) AND (((lib_mandat_gestion_type)::text <> 'JUDICIAIRE'::text) OR ((lib_mandat_gestion_type)::text = 'JUDICIAIRE'::text)))
  • Rows Removed by Filter: 808
16.          

SubPlan (for Hash Join)

17. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=0.43..3.54 rows=1 width=0) (never executed)

18. 0.000 0.000 ↓ 0.0 0

Index Only Scan using t_dossier_pkey on t_dossier dossier11_ (cost=0.43..2.45 rows=1 width=16) (never executed)

  • Index Cond: (id_dossier = versement0_.id_dossier)
  • Heap Fetches: 0
19. 0.000 0.000 ↓ 0.0 0

Seq Scan on t_titre_judiciaire titrejudic12_ (cost=0.00..1.08 rows=1 width=16) (never executed)

  • Filter: ((NOT boo_supprime) AND (NOT boo_en_migration) AND (id_dossier = versement0_.id_dossier) AND ((statut)::text = 'TITRE'::text) AND (date(dat_date_titre) <= '2020-07-01'::date))
20. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=0.43..3.52 rows=1 width=16) (never executed)

21. 0.000 0.000 ↓ 0.0 0

Seq Scan on t_titre_judiciaire titrejudic12__1 (cost=0.00..1.07 rows=1 width=16) (never executed)

  • Filter: ((NOT boo_supprime) AND (NOT boo_en_migration) AND ((statut)::text = 'TITRE'::text) AND (date(dat_date_titre) <= '2020-07-01'::date))
22. 0.000 0.000 ↓ 0.0 0

Index Only Scan using t_dossier_pkey on t_dossier dossier11__1 (cost=0.43..2.45 rows=1 width=16) (never executed)

  • Index Cond: (id_dossier = titrejudic12__1.id_dossier)
  • Heap Fetches: 0
23. 0.000 0.000 ↓ 0.0 0

Aggregate (cost=3.52..3.53 rows=1 width=8) (never executed)

24. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=0.43..3.52 rows=1 width=8) (never executed)

25. 0.000 0.000 ↓ 0.0 0

Index Only Scan using t_dossier_pkey on t_dossier dossier13_ (cost=0.43..2.45 rows=1 width=16) (never executed)

  • Index Cond: (id_dossier = versement0_.id_dossier)
  • Heap Fetches: 0
26. 0.000 0.000 ↓ 0.0 0

Seq Scan on t_titre_judiciaire titrejudic14_ (cost=0.00..1.06 rows=1 width=24) (never executed)

  • Filter: ((NOT boo_supprime) AND (NOT boo_en_migration) AND (id_dossier = versement0_.id_dossier) AND ((statut)::text = 'TITRE'::text))
27. 0.005 0.013 ↑ 1.0 9 1

Hash (cost=1.09..1.09 rows=9 width=22) (actual time=0.013..0.013 rows=9 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
28. 0.008 0.008 ↑ 1.0 9 1

Seq Scan on t_type_versement typeversem5_ (cost=0.00..1.09 rows=9 width=22) (actual time=0.006..0.008 rows=9 loops=1)

29. 0.028 0.182 ↓ 0.0 0 14

Bitmap Heap Scan on t_versement versement15_ (cost=0.90..1.93 rows=2 width=32) (actual time=0.013..0.013 rows=0 loops=14)

  • Recheck Cond: ((id_versement_annule = versement0_.id_versement) OR (id_versement_impaye = versement0_.id_versement))
  • Filter: ((NOT boo_supprime) AND (NOT boo_en_migration))
30. 0.014 0.154 ↓ 0.0 0 14

BitmapOr (cost=0.90..0.90 rows=2 width=0) (actual time=0.011..0.011 rows=0 loops=14)

31. 0.084 0.084 ↓ 0.0 0 14

Bitmap Index Scan on t_versement_id_versement_annule_idx (cost=0.00..0.45 rows=1 width=0) (actual time=0.006..0.006 rows=0 loops=14)

  • Index Cond: (id_versement_annule = versement0_.id_versement)
32. 0.056 0.056 ↓ 0.0 0 14

Bitmap Index Scan on t_versement_id_versement_impaye_idx (cost=0.00..0.45 rows=1 width=0) (actual time=0.004..0.004 rows=0 loops=14)

  • Index Cond: (id_versement_impaye = versement0_.id_versement)
33. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=1.84..2.84 rows=1 width=24) (never executed)

34. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=1.71..2.67 rows=1 width=40) (never executed)

35. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=1.28..2.02 rows=1 width=40) (never executed)

36. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=0.85..1.20 rows=1 width=40) (never executed)

37. 0.000 0.000 ↓ 0.0 0

Index Only Scan using t_dossier_pkey on t_dossier dossier10_ (cost=0.43..0.57 rows=1 width=16) (never executed)

  • Index Cond: (id_dossier = versement0_.id_dossier)
  • Heap Fetches: 0
38. 0.000 0.000 ↓ 0.0 0

Index Scan using t_versement_id_dossier_idx on t_versement versement6_ (cost=0.42..0.62 rows=1 width=40) (never executed)

  • Index Cond: (id_dossier = dossier10_.id_dossier)
  • Filter: ((NOT boo_supprime) AND (NOT boo_en_migration) AND (((lib_statut)::text = ANY ('{NEW,A_VALIDE,VALIDE}'::text[])) OR ((lib_statut)::text = 'PAS_VALIDABLE'::text)))
39. 0.000 0.000 ↓ 0.0 0

Index Scan using t_imputation_id_versement_idx on t_imputation imputation7_ (cost=0.42..0.81 rows=1 width=32) (never executed)

  • Index Cond: (id_versement = versement6_.id_versement)
  • Filter: ((NOT boo_supprime) AND (NOT boo_en_migration))
40. 0.000 0.000 ↓ 0.0 0

Index Scan using t_creance_pkey on t_creance creance8_ (cost=0.43..0.65 rows=1 width=32) (never executed)

  • Index Cond: (id_creance = imputation7_.id_creance)
41. 0.000 0.000 ↓ 0.0 0

Index Scan using t_creance_type_pkey on t_creance_type creancetyp9_ (cost=0.13..0.15 rows=1 width=16) (never executed)

  • Index Cond: (id_creance_type = creance8_.id_creance_type)
  • Filter: ((cod_tech_creance_type)::text = 'PRINCIPAL'::text)
Planning time : 14.318 ms
Execution time : 550.060 ms