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 23,459.387 ↓ 114,657.0 114,657 1

Unique (cost=77,379.38..77,379.52 rows=1 width=271) (actual time=23,150.292..23,459.387 rows=114,657 loops=1)

2. 533.190 23,259.118 ↓ 114,657.0 114,657 1

Sort (cost=77,379.38..77,379.38 rows=1 width=271) (actual time=23,150.289..23,259.118 rows=114,657 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. 2,405.894 22,725.928 ↓ 114,657.0 114,657 1

HashAggregate (cost=77,379.35..77,379.37 rows=1 width=271) (actual time=22,383.609..22,725.928 rows=114,657 loops=1)

4. 131.662 20,320.034 ↓ 123,963.0 123,963 1

Nested Loop (cost=68,010.34..77,379.22 rows=1 width=271) (actual time=15,454.506..20,320.034 rows=123,963 loops=1)

5. 202.874 19,390.906 ↓ 132,911.0 132,911 1

Nested Loop (cost=68,010.34..77,374.91 rows=1 width=279) (actual time=15,454.474..19,390.906 rows=132,911 loops=1)

6. 204.594 18,644.780 ↓ 135,813.0 135,813 1

Nested Loop (cost=68,010.34..77,370.62 rows=1 width=271) (actual time=15,454.434..18,644.780 rows=135,813 loops=1)

7. 207.032 17,896.934 ↓ 135,813.0 135,813 1

Nested Loop (cost=68,010.34..77,370.28 rows=1 width=258) (actual time=15,454.359..17,896.934 rows=135,813 loops=1)

8. 1,166.798 17,177.446 ↓ 128,114.0 128,114 1

Hash Join (cost=68,010.34..77,369.98 rows=1 width=258) (actual time=15,454.261..17,177.446 rows=128,114 loops=1)

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

Hash Join (cost=6,379.53..14,990.74 rows=199,579 width=57) (actual time=208.786..765.258 rows=199,579 loops=1)

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

Seq Scan on dossiers (cost=0.00..4,595.21 rows=202,021 width=44) (actual time=0.016..85.367 rows=202,021 loops=1)

11. 111.487 208.158 ↑ 1.0 199,579 1

Hash (cost=3,884.79..3,884.79 rows=199,579 width=13) (actual time=208.158..208.158 rows=199,579 loops=1)

12. 96.671 96.671 ↑ 1.0 199,579 1

Seq Scan on detailsdroitsrsa (cost=0.00..3,884.79 rows=199,579 width=13) (actual time=0.026..96.671 rows=199,579 loops=1)

13. 325.616 15,245.390 ↓ 128,114.0 128,114 1

Hash (cost=61,630.80..61,630.80 rows=1 width=217) (actual time=15,245.390..15,245.390 rows=128,114 loops=1)

14. 355.938 14,919.774 ↓ 128,114.0 128,114 1

Nested Loop (cost=37,946.22..61,630.80 rows=1 width=217) (actual time=1,704.229..14,919.774 rows=128,114 loops=1)

15. 260.907 13,677.780 ↓ 295,352.0 295,352 1

Nested Loop (cost=37,946.22..61,630.50 rows=1 width=211) (actual time=1,703.730..13,677.780 rows=295,352 loops=1)

16. 324.129 11,940.113 ↓ 295,352.0 295,352 1

Nested Loop (cost=37,946.22..61,630.20 rows=1 width=211) (actual time=1,703.666..11,940.113 rows=295,352 loops=1)

17. 6,641.716 9,843.884 ↓ 295,350.0 295,350 1

Hash Join (cost=37,946.22..61,629.90 rows=1 width=203) (actual time=1,703.534..9,843.884 rows=295,350 loops=1)

  • Hash Cond: (personnes.id = public.orientsstructs.personne_id)
18. 1,228.297 1,584.378 ↓ 1.0 575,693 1

Hash Left Join (cost=1,402.92..22,927.81 rows=575,674 width=179) (actual time=85.483..1,584.378 rows=575,693 loops=1)

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

Seq Scan on personnes (cost=0.00..13,246.74 rows=575,674 width=54) (actual time=0.048..270.722 rows=575,674 loops=1)

20. 46.417 85.359 ↑ 1.0 36,263 1

Hash (cost=949.63..949.63 rows=36,263 width=125) (actual time=85.359..85.359 rows=36,263 loops=1)

21. 38.942 38.942 ↑ 1.0 36,263 1

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

22. 274.554 1,617.790 ↓ 295,331.0 295,331 1

Hash (cost=36,543.29..36,543.29 rows=1 width=24) (actual time=1,617.790..1,617.790 rows=295,331 loops=1)

23. 614.136 1,343.236 ↓ 295,331.0 295,331 1

Hash Join (cost=23,069.58..36,543.29 rows=1 width=24) (actual time=640.336..1,343.236 rows=295,331 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 295,592 1

Seq Scan on orientsstructs (cost=0.00..5,344.92 rows=295,592 width=24) (actual time=0.018..89.307 rows=295,592 loops=1)

25. 158.840 639.793 ↑ 1.0 295,331 1

Hash (cost=18,635.70..18,635.70 rows=295,592 width=8) (actual time=639.793..639.793 rows=295,331 loops=1)

26. 218.691 480.953 ↑ 1.0 295,331 1

GroupAggregate (cost=0.00..15,679.78 rows=295,592 width=8) (actual time=0.062..480.953 rows=295,331 loops=1)

27. 262.262 262.262 ↑ 1.0 295,592 1

Index Scan using orientsstructs_personne_id_idx on orientsstructs (cost=0.00..10,506.92 rows=295,592 width=8) (actual time=0.038..262.262 rows=295,592 loops=1)

28. 1,772.100 1,772.100 ↑ 1.0 1 295,350

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=295,350)

  • Index Cond: ((adressesfoyers.foyer_id = personnes.foyer_id) AND (adressesfoyers.rgadr = '01'::bpchar))
29. 1,476.760 1,476.760 ↑ 1.0 1 295,352

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=295,352)

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

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=295,352)

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

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=128,114)

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

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=135,813)

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

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=135,813)

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

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=132,911)

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