explain.depesz.com

A tool for finding a real cause for slow queries.

Result: weS

options
Did it help? Consider supporting us - Bitcoin address: 12v2hUztAk2LgzQ9H9LMwuU32urHMjZQnq
# exclusive inclusive rows x rows loops node
1. 200.269 23459.387 ↓ 114657.0 114657 1

Unique (cost=77379.38..77379.52 rows=1 width=271) (actual time=23150.292..23459.387 rows=114657 loops=1)

2. 533.190 23259.118 ↓ 114657.0 114657 1

Sort (cost=77379.38..77379.38 rows=1 width=271) (actual time=23150.289..23259.118 rows=114657 loops=1)

  • Sort Key: personnes.id, dossiers.numdemrsa, dossiers.matricule, dossiers.numorgcedmut, dossiers.ddarrmut, situationsdossiersrsa.etatdosrsa, detailsdroitsrsa.topsansdomfixe, calculsdroitsrsa.toppersdrodevorsa, prestations.rolepers, (dbconcat((detailscalculsdroitsrsa.natpf)::text)), public.orientsstructs.propo_algo, public.orientsstructs.statut_orient, personnes.qual, personnes.nom, personnes.prenom, personnes.dtnai, dossiers.dtdemrsa, personnes.nir, personnes.idassedic, adresses.codepos, adresses.locaadr, foyers.sitfam, detailsdroitsrsa.nbenfautcha, dsps.id, dsps.personne_id, dsps.topdrorsarmiant, dsps.drorsarmianta2, dsps.sitpersdemrsa, dsps.topisogroouenf, dsps.topcouvsoc, dsps.accosocfam, dsps.accosocindi, dsps.soutdemarsoc, dsps.nivetu, dsps.nivdipmaxobt, dsps.annobtnivdipmax, dsps.topcompeextrapro, dsps.topengdemarechemploi, dsps.hispro, dsps.duractdomi, dsps.cessderact, dsps.topdomideract, dsps.inscdememploi, dsps.topisogrorechemploi, dsps.accoemploi, dsps.topprojpro, dsps.topcreareprientre, dsps.concoformqualiemploi, dsps.topmoyloco, dsps.toppermicondub, dsps.topautrpermicondu, dsps.natlog, dsps.demarlog, dsps.statutoccupation
  • Sort Method: external merge Disk: 19192kB
3. 2405.894 22725.928 ↓ 114657.0 114657 1

HashAggregate (cost=77379.35..77379.37 rows=1 width=271) (actual time=22383.609..22725.928 rows=114657 loops=1)

4. 131.662 20320.034 ↓ 123963.0 123963 1

Nested Loop (cost=68010.34..77379.22 rows=1 width=271) (actual time=15454.506..20320.034 rows=123963 loops=1)

5. 202.874 19390.906 ↓ 132911.0 132911 1

Nested Loop (cost=68010.34..77374.91 rows=1 width=279) (actual time=15454.474..19390.906 rows=132911 loops=1)

6. 204.594 18644.780 ↓ 135813.0 135813 1

Nested Loop (cost=68010.34..77370.62 rows=1 width=271) (actual time=15454.434..18644.780 rows=135813 loops=1)

7. 207.032 17896.934 ↓ 135813.0 135813 1

Nested Loop (cost=68010.34..77370.28 rows=1 width=258) (actual time=15454.359..17896.934 rows=135813 loops=1)

8. 1166.798 17177.446 ↓ 128114.0 128114 1

Hash Join (cost=68010.34..77369.98 rows=1 width=258) (actual time=15454.261..17177.446 rows=128114 loops=1)

  • Hash Cond: (detailsdroitsrsa.dossier_id = foyers.dossier_id)
9. 471.733 765.258 ↑ 1.0 199579 1

Hash Join (cost=6379.53..14990.74 rows=199579 width=57) (actual time=208.786..765.258 rows=199579 loops=1)

  • Hash Cond: (dossiers.id = detailsdroitsrsa.dossier_id)
10. 85.367 85.367 ↑ 1.0 202021 1

Seq Scan on dossiers (cost=0.00..4595.21 rows=202021 width=44) (actual time=0.016..85.367 rows=202021 loops=1)

11. 111.487 208.158 ↑ 1.0 199579 1

Hash (cost=3884.79..3884.79 rows=199579 width=13) (actual time=208.158..208.158 rows=199579 loops=1)

12. 96.671 96.671 ↑ 1.0 199579 1

Seq Scan on detailsdroitsrsa (cost=0.00..3884.79 rows=199579 width=13) (actual time=0.026..96.671 rows=199579 loops=1)

13. 325.616 15245.390 ↓ 128114.0 128114 1

Hash (cost=61630.80..61630.80 rows=1 width=217) (actual time=15245.390..15245.390 rows=128114 loops=1)

14. 355.938 14919.774 ↓ 128114.0 128114 1

Nested Loop (cost=37946.22..61630.80 rows=1 width=217) (actual time=1704.229..14919.774 rows=128114 loops=1)

15. 260.907 13677.780 ↓ 295352.0 295352 1

Nested Loop (cost=37946.22..61630.50 rows=1 width=211) (actual time=1703.730..13677.780 rows=295352 loops=1)

16. 324.129 11940.113 ↓ 295352.0 295352 1

Nested Loop (cost=37946.22..61630.20 rows=1 width=211) (actual time=1703.666..11940.113 rows=295352 loops=1)

17. 6641.716 9843.884 ↓ 295350.0 295350 1

Hash Join (cost=37946.22..61629.90 rows=1 width=203) (actual time=1703.534..9843.884 rows=295350 loops=1)

  • Hash Cond: (personnes.id = public.orientsstructs.personne_id)
18. 1228.297 1584.378 ↓ 1.0 575693 1

Hash Left Join (cost=1402.92..22927.81 rows=575674 width=179) (actual time=85.483..1584.378 rows=575693 loops=1)

  • Hash Cond: (personnes.id = dsps.personne_id)
19. 270.722 270.722 ↑ 1.0 575674 1

Seq Scan on personnes (cost=0.00..13246.74 rows=575674 width=54) (actual time=0.048..270.722 rows=575674 loops=1)

20. 46.417 85.359 ↑ 1.0 36263 1

Hash (cost=949.63..949.63 rows=36263 width=125) (actual time=85.359..85.359 rows=36263 loops=1)

21. 38.942 38.942 ↑ 1.0 36263 1

Seq Scan on dsps (cost=0.00..949.63 rows=36263 width=125) (actual time=0.023..38.942 rows=36263 loops=1)

22. 274.554 1617.790 ↓ 295331.0 295331 1

Hash (cost=36543.29..36543.29 rows=1 width=24) (actual time=1617.790..1617.790 rows=295331 loops=1)

23. 614.136 1343.236 ↓ 295331.0 295331 1

Hash Join (cost=23069.58..36543.29 rows=1 width=24) (actual time=640.336..1343.236 rows=295331 loops=1)

  • Hash Cond: ((public.orientsstructs.personne_id = public.orientsstructs.personne_id) AND (public.orientsstructs.id = (max(public.orientsstructs.id))))
24. 89.307 89.307 ↑ 1.0 295592 1

Seq Scan on orientsstructs (cost=0.00..5344.92 rows=295592 width=24) (actual time=0.018..89.307 rows=295592 loops=1)

25. 158.840 639.793 ↑ 1.0 295331 1

Hash (cost=18635.70..18635.70 rows=295592 width=8) (actual time=639.793..639.793 rows=295331 loops=1)

26. 218.691 480.953 ↑ 1.0 295331 1

GroupAggregate (cost=0.00..15679.78 rows=295592 width=8) (actual time=0.062..480.953 rows=295331 loops=1)

27. 262.262 262.262 ↑ 1.0 295592 1

Index Scan using orientsstructs_personne_id_idx on orientsstructs (cost=0.00..10506.92 rows=295592 width=8) (actual time=0.038..262.262 rows=295592 loops=1)

28. 1772.100 1772.100 ↑ 1.0 1 295350

Index Scan using adressesfoyers_actuelle_rsa_idx on adressesfoyers (cost=0.00..0.29 rows=1 width=8) (actual time=0.005..0.006 rows=1 loops=295350)

  • Index Cond: ((adressesfoyers.foyer_id = personnes.foyer_id) AND (adressesfoyers.rgadr = '01'::bpchar))
29. 1476.760 1476.760 ↑ 1.0 1 295352

Index Scan using foyers_pkey on foyers (cost=0.00..0.28 rows=1 width=12) (actual time=0.004..0.005 rows=1 loops=295352)

  • Index Cond: (foyers.id = personnes.foyer_id)
30. 886.056 886.056 ↓ 0.0 0 295352

Index Scan using situationsdossiersrsa_etatdosrsa_ouvert_indefini_idx on situationsdossiersrsa (cost=0.00..0.29 rows=1 width=6) (actual time=0.003..0.003 rows=0 loops=295352)

  • Index Cond: (situationsdossiersrsa.dossier_id = foyers.dossier_id)
  • Filter: (situationsdossiersrsa.etatdosrsa = ANY ('{2,3,4}'::bpchar[]))
31. 512.456 512.456 ↑ 1.0 1 128114

Index Scan using detailscalculsdroitsrsa_detaildroitrsa_id_idx on detailscalculsdroitsrsa (cost=0.00..0.28 rows=1 width=8) (actual time=0.004..0.004 rows=1 loops=128114)

  • Index Cond: (detailscalculsdroitsrsa.detaildroitrsa_id = detailsdroitsrsa.id)
32. 543.252 543.252 ↑ 1.0 1 135813

Index Scan using adresses_pkey on adresses (cost=0.00..0.33 rows=1 width=21) (actual time=0.004..0.004 rows=1 loops=135813)

  • Index Cond: (adresses.id = adressesfoyers.adresse_id)
33. 543.252 543.252 ↑ 1.0 1 135813

Index Scan using calculsdroitsrsa_personne_id_idx on calculsdroitsrsa (cost=0.00..4.28 rows=1 width=8) (actual time=0.004..0.004 rows=1 loops=135813)

  • Index Cond: (calculsdroitsrsa.personne_id = personnes.id)
34. 797.466 797.466 ↑ 1.0 1 132911

Index Scan using prestations_allocataire_rsa_idx on prestations (cost=0.00..4.30 rows=1 width=8) (actual time=0.005..0.006 rows=1 loops=132911)

  • Index Cond: ((prestations.personne_id = personnes.id) AND (prestations.natprest = 'RSA'::bpchar))