explain.depesz.com

A tool for finding a real cause for slow queries.

Result: uvB

options
Did it help? Consider supporting us - Bitcoin address: 12v2hUztAk2LgzQ9H9LMwuU32urHMjZQnq
# exclusive inclusive rows x rows loops node
1. 198.868 11,554.292 ↓ 15.7 114,657 1

Unique (cost=134,095.32..135,099.07 rows=7,300 width=271) (actual time=11,252.515..11,554.292 rows=114,657 loops=1)

2. 526.060 11,355.424 ↓ 15.7 114,657 1

Sort (cost=134,095.32..134,113.57 rows=7,300 width=271) (actual time=11,252.511..11,355.424 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,309.107 10,829.364 ↓ 15.7 114,657 1

HashAggregate (cost=133,517.39..133,626.89 rows=7,300 width=271) (actual time=10,515.462..10,829.364 rows=114,657 loops=1)

4. 184.111 8,520.257 ↓ 17.0 123,963 1

Nested Loop Left Join (cost=119,460.67..132,531.89 rows=7,300 width=271) (actual time=6,932.912..8,520.257 rows=123,963 loops=1)

5. 913.568 7,964.296 ↓ 17.0 123,950 1

Hash Join (cost=119,460.67..130,405.43 rows=7,300 width=146) (actual time=6,932.838..7,964.296 rows=123,950 loops=1)

  • Hash Cond: (prestations.personne_id = personnes.id)
6. 119.850 164.069 ↓ 1.1 275,314 1

Bitmap Heap Scan on prestations (cost=3,945.59..13,880.40 rows=249,854 width=8) (actual time=45.298..164.069 rows=275,314 loops=1)

  • Recheck Cond: ((natprest = 'RSA'::bpchar) AND (rolepers = ANY ('{DEM,CJT}'::bpchar[])))
7. 44.219 44.219 ↓ 1.1 275,314 1

Bitmap Index Scan on prestations_allocataire_rsa_idx (cost=0.00..3,883.12 rows=249,854 width=0) (actual time=44.219..44.219 rows=275,314 loops=1)

  • Index Cond: (natprest = 'RSA'::bpchar)
8. 310.852 6,886.659 ↓ 7.4 132,898 1

Hash (cost=115,289.19..115,289.19 rows=18,072 width=150) (actual time=6,886.659..6,886.659 rows=132,898 loops=1)

9. 690.611 6,575.807 ↓ 7.4 132,898 1

Hash Join (cost=109,172.57..115,289.19 rows=18,072 width=150) (actual time=5,787.493..6,575.807 rows=132,898 loops=1)

  • Hash Cond: (calculsdroitsrsa.personne_id = personnes.id)
10. 97.824 97.824 ↑ 1.0 292,429 1

Seq Scan on calculsdroitsrsa (cost=0.00..4,839.29 rows=292,429 width=8) (actual time=0.015..97.824 rows=292,429 loops=1)

11. 310.162 5,787.372 ↓ 3.8 135,800 1

Hash (cost=108,727.85..108,727.85 rows=35,577 width=142) (actual time=5,787.372..5,787.372 rows=135,800 loops=1)

12. 752.244 5,477.210 ↓ 3.8 135,800 1

Hash Join (cost=65,691.88..108,727.85 rows=35,577 width=142) (actual time=3,431.841..5,477.210 rows=135,800 loops=1)

  • Hash Cond: (personnes.id = public.orientsstructs.personne_id)
13. 259.435 3,506.763 ↓ 1.9 262,586 1

Nested Loop (cost=40,602.79..81,377.60 rows=138,574 width=122) (actual time=2,213.594..3,506.763 rows=262,586 loops=1)

14. 198.314 2,663.042 ↓ 2.0 97,381 1

Merge Join (cost=40,602.79..52,099.93 rows=48,630 width=80) (actual time=2,213.547..2,663.042 rows=97,381 loops=1)

  • Merge Cond: (adresses.id = adressesfoyers.adresse_id)
15. 178.957 178.957 ↑ 1.0 304,881 1

Index Scan using adresses_pkey on adresses (cost=0.00..10,001.76 rows=304,881 width=21) (actual time=0.038..178.957 rows=304,881 loops=1)

16. 322.936 2,285.771 ↓ 2.0 97,381 1

Sort (cost=40,600.14..40,724.95 rows=49,925 width=67) (actual time=2,213.493..2,285.771 rows=97,381 loops=1)

  • Sort Key: adressesfoyers.adresse_id
  • Sort Method: external sort Disk: 7768kB
17. 298.241 1,962.835 ↓ 2.0 97,381 1

Hash Join (cost=28,340.12..36,704.12 rows=49,925 width=67) (actual time=1,535.345..1,962.835 rows=97,381 loops=1)

  • Hash Cond: (adressesfoyers.foyer_id = foyers.id)
18. 129.435 129.435 ↓ 1.0 202,023 1

Seq Scan on adressesfoyers (cost=0.00..6,855.18 rows=201,915 width=8) (actual time=0.023..129.435 rows=202,023 loops=1)

  • Filter: (rgadr = '01'::bpchar)
19. 118.411 1,535.159 ↓ 1.9 97,378 1

Hash (cost=27,715.74..27,715.74 rows=49,951 width=59) (actual time=1,535.159..1,535.159 rows=97,378 loops=1)

20. 297.876 1,416.748 ↓ 1.9 97,378 1

Hash Join (cost=21,352.27..27,715.74 rows=49,951 width=59) (actual time=1,051.380..1,416.748 rows=97,378 loops=1)

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

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

22. 84.178 1,051.186 ↓ 1.9 97,378 1

Hash (cost=20,720.23..20,720.23 rows=50,563 width=31) (actual time=1,051.186..1,051.186 rows=97,378 loops=1)

23. 278.752 967.008 ↓ 1.9 97,378 1

Hash Join (cost=15,832.27..20,720.23 rows=50,563 width=31) (actual time=631.040..967.008 rows=97,378 loops=1)

  • Hash Cond: (foyers.dossier_id = detailsdroitsrsa.dossier_id)
24. 57.379 57.379 ↑ 1.0 202,022 1

Seq Scan on foyers (cost=0.00..3,372.22 rows=202,022 width=12) (actual time=0.030..57.379 rows=202,022 loops=1)

25. 74.699 630.877 ↓ 1.9 97,377 1

Hash (cost=15,200.23..15,200.23 rows=50,563 width=19) (actual time=630.877..630.877 rows=97,377 loops=1)

26. 141.449 556.178 ↓ 1.9 97,377 1

Hash Join (cost=11,812.05..15,200.23 rows=50,563 width=19) (actual time=378.277..556.178 rows=97,377 loops=1)

  • Hash Cond: (detailscalculsdroitsrsa.detaildroitrsa_id = detailsdroitsrsa.id)
27. 36.743 36.743 ↑ 1.0 118,926 1

Seq Scan on detailscalculsdroitsrsa (cost=0.00..2,139.26 rows=118,926 width=8) (actual time=0.015..36.743 rows=118,926 loops=1)

28. 68.039 377.986 ↓ 1.1 92,253 1

Hash (cost=10,751.39..10,751.39 rows=84,853 width=19) (actual time=377.986..377.986 rows=92,253 loops=1)

29. 153.108 309.947 ↓ 1.1 92,253 1

Hash Join (cost=4,271.75..10,751.39 rows=84,853 width=19) (actual time=93.844..309.947 rows=92,253 loops=1)

  • Hash Cond: (detailsdroitsrsa.dossier_id = situationsdossiersrsa.dossier_id)
30. 63.261 63.261 ↑ 1.0 199,579 1

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

31. 45.730 93.578 ↓ 1.1 92,253 1

Hash (cost=3,211.09..3,211.09 rows=84,853 width=6) (actual time=93.578..93.578 rows=92,253 loops=1)

32. 34.696 47.848 ↓ 1.1 92,253 1

Bitmap Heap Scan on situationsdossiersrsa (cost=970.36..3,211.09 rows=84,853 width=6) (actual time=13.306..47.848 rows=92,253 loops=1)

  • Recheck Cond: (etatdosrsa = ANY ('{2,3,4}'::bpchar[]))
33. 13.152 13.152 ↓ 1.1 92,253 1

Bitmap Index Scan on situationsdossiersrsa_etatdosrsa_idx (cost=0.00..949.15 rows=84,853 width=0) (actual time=13.152..13.152 rows=92,253 loops=1)

  • Index Cond: (etatdosrsa = ANY ('{2,3,4}'::bpchar[]))
34. 584.286 584.286 ↑ 2.7 3 97,381

Index Scan using personnes_foyer_id_idx on personnes (cost=0.00..0.50 rows=8 width=54) (actual time=0.004..0.006 rows=3 loops=97,381)

  • Index Cond: (personnes.foyer_id = adressesfoyers.foyer_id)
35. 192.558 1,218.203 ↓ 2.0 295,331 1

Hash (cost=23,241.64..23,241.64 rows=147,796 width=20) (actual time=1,218.203..1,218.203 rows=295,331 loops=1)

36. 584.483 1,025.645 ↓ 2.0 295,331 1

Seq Scan on orientsstructs (cost=16,418.76..23,241.64 rows=147,796 width=20) (actual time=686.151..1,025.645 rows=295,331 loops=1)

  • Filter: (hashed subplan)
37.          

SubPlan (forSeq Scan)

38. 210.302 441.162 ↑ 1.0 295,331 1

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

39. 230.860 230.860 ↑ 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.037..230.860 rows=295,592 loops=1)

40. 371.850 371.850 ↓ 0.0 0 123,950

Index Scan using dsps_personne_id_idx on dsps (cost=0.00..0.28 rows=1 width=125) (actual time=0.003..0.003 rows=0 loops=123,950)

  • Index Cond: (dsps.personne_id = personnes.id)