explain.depesz.com

PostgreSQL's explain analyze made readable

Result: fDER

Settings
# exclusive inclusive rows x rows loops node
1. 0.014 91.971 ↑ 1.0 50 1

Limit (cost=2,540.46..2,540.58 rows=50 width=428) (actual time=91.955..91.971 rows=50 loops=1)

2. 2.824 91.957 ↑ 23.2 50 1

Sort (cost=2,540.46..2,543.35 rows=1,158 width=428) (actual time=91.953..91.957 rows=50 loops=1)

  • Sort Key: t0_.raison_sociale
  • Sort Method: top-N heapsort Memory: 32kB
3. 9.177 89.133 ↓ 10.1 11,750 1

Hash Left Join (cost=2,175.31..2,501.99 rows=1,158 width=428) (actual time=73.796..89.133 rows=11,750 loops=1)

  • Hash Cond: (t1_.statut_courant = t3_.id)
4. 4.989 79.940 ↓ 10.1 11,750 1

Hash Right Join (cost=2,162.84..2,462.01 rows=1,158 width=486) (actual time=73.763..79.940 rows=11,750 loops=1)

  • Hash Cond: (t1_.id_demande_afci = t9_.id)
5. 1.215 1.215 ↑ 1.0 11,750 1

Seq Scan on t_afci t1_ (cost=0.00..243.25 rows=11,825 width=17) (actual time=0.009..1.215 rows=11,750 loops=1)

6. 3.919 73.736 ↓ 10.1 11,750 1

Hash (cost=2,148.36..2,148.36 rows=1,158 width=477) (actual time=73.736..73.736 rows=11,750 loops=1)

  • Buckets: 16384 (originally 2048) Batches: 1 (originally 1) Memory Usage: 1138kB
7. 8.287 69.817 ↓ 10.1 11,750 1

Nested Loop Left Join (cost=1,418.05..2,148.36 rows=1,158 width=477) (actual time=41.969..69.817 rows=11,750 loops=1)

8. 4.517 49.780 ↓ 10.1 11,750 1

Hash Right Join (cost=1,417.76..1,712.20 rows=1,158 width=477) (actual time=41.937..49.780 rows=11,750 loops=1)

  • Hash Cond: (r8_.id_pers_morale = t0_.id)
9. 7.744 8.853 ↑ 1.0 11,749 1

HashAggregate (cost=244.79..363.89 rows=11,910 width=8) (actual time=5.511..8.853 rows=11,749 loops=1)

  • Group Key: r8_.id_pers_morale
10. 1.109 1.109 ↑ 1.0 11,758 1

Seq Scan on r_demande_afci_pers_morale r8_ (cost=0.00..185.19 rows=11,919 width=8) (actual time=0.020..1.109 rows=11,758 loops=1)

11. 3.889 36.410 ↓ 10.3 11,750 1

Hash (cost=1,158.69..1,158.69 rows=1,143 width=477) (actual time=36.410..36.410 rows=11,750 loops=1)

  • Buckets: 16384 (originally 2048) Batches: 1 (originally 1) Memory Usage: 1138kB
12. 3.036 32.521 ↓ 10.3 11,750 1

Hash Join (cost=890.54..1,158.69 rows=1,143 width=477) (actual time=21.108..32.521 rows=11,750 loops=1)

  • Hash Cond: (r7_.phy_id = t4_.id)
13. 2.859 29.450 ↓ 10.3 11,750 1

Hash Join (cost=880.09..1,142.81 rows=1,143 width=205) (actual time=21.057..29.450 rows=11,750 loops=1)

  • Hash Cond: (r5_.adr_id = t2_.id)
14. 4.323 26.582 ↓ 5.1 11,750 1

Hash Join (cost=879.03..1,121.75 rows=2,286 width=47) (actual time=21.036..26.582 rows=11,750 loops=1)

  • Hash Cond: (r5_.mrl_id = t0_.id)
15. 1.259 1.259 ↑ 1.0 11,751 1

Seq Scan on r_pers_morale_adresse r5_ (cost=0.00..175.44 rows=11,944 width=8) (actual time=0.009..1.259 rows=11,751 loops=1)

16. 3.794 21.000 ↓ 5.2 11,750 1

Hash (cost=850.91..850.91 rows=2,249 width=43) (actual time=21.000..21.000 rows=11,750 loops=1)

  • Buckets: 16384 (originally 4096) Batches: 1 (originally 1) Memory Usage: 725kB
17. 4.636 17.206 ↓ 5.2 11,750 1

Hash Join (cost=482.32..850.91 rows=2,249 width=43) (actual time=5.388..17.206 rows=11,750 loops=1)

  • Hash Cond: (t0_.parent_id = t6_.id)
18. 7.221 7.221 ↓ 1.0 11,750 1

Seq Scan on t_pers_morale t0_ (cost=0.00..302.26 rows=11,692 width=43) (actual time=0.015..7.221 rows=11,750 loops=1)

  • Filter: ("substring"((num_id_entreprise)::text, 10) <> ''::text)
  • Rows Removed by Filter: 1
19. 0.004 5.349 ↑ 376.7 6 1

Hash (cost=454.07..454.07 rows=2,260 width=12) (actual time=5.349..5.349 rows=6 loops=1)

  • Buckets: 4096 Batches: 1 Memory Usage: 33kB
20. 0.084 5.345 ↑ 376.7 6 1

Hash Join (cost=390.40..454.07 rows=2,260 width=12) (actual time=5.341..5.345 rows=6 loops=1)

  • Hash Cond: (r7_.mrl_id = t6_.id)
21. 0.003 0.003 ↑ 376.7 6 1

Seq Scan on r_pers_morale_pers_physique r7_ (cost=0.00..32.60 rows=2,260 width=8) (actual time=0.003..0.003 rows=6 loops=1)

22. 2.816 5.258 ↑ 1.0 11,751 1

Hash (cost=243.51..243.51 rows=11,751 width=4) (actual time=5.258..5.258 rows=11,751 loops=1)

  • Buckets: 16384 Batches: 1 Memory Usage: 542kB
23. 2.442 2.442 ↑ 1.0 11,751 1

Seq Scan on t_pers_morale t6_ (cost=0.00..243.51 rows=11,751 width=4) (actual time=0.004..2.442 rows=11,751 loops=1)

24. 0.003 0.009 ↓ 1.5 3 1

Hash (cost=1.04..1.04 rows=2 width=166) (actual time=0.009..0.009 rows=3 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
25. 0.006 0.006 ↓ 1.5 3 1

Seq Scan on t_adresse t2_ (cost=0.00..1.04 rows=2 width=166) (actual time=0.004..0.006 rows=3 loops=1)

  • Filter: est_principale
  • Rows Removed by Filter: 1
26. 0.017 0.035 ↓ 1.5 30 1

Hash (cost=10.20..10.20 rows=20 width=280) (actual time=0.035..0.035 rows=30 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 10kB
27. 0.018 0.018 ↓ 1.5 30 1

Seq Scan on t_pers_physique t4_ (cost=0.00..10.20 rows=20 width=280) (actual time=0.013..0.018 rows=30 loops=1)

28. 11.750 11.750 ↑ 1.0 1 11,750

Index Only Scan using t_demande_afci_pkey on t_demande_afci t9_ (cost=0.29..0.37 rows=1 width=4) (actual time=0.001..0.001 rows=1 loops=11,750)

  • Index Cond: (id = (max(r8_.id_demande_afci)))
  • Heap Fetches: 11748
29. 0.004 0.016 ↑ 8.5 13 1

Hash (cost=11.10..11.10 rows=110 width=142) (actual time=0.016..0.016 rows=13 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
30. 0.012 0.012 ↑ 8.5 13 1

Seq Scan on t_statut_demande t3_ (cost=0.00..11.10 rows=110 width=142) (actual time=0.009..0.012 rows=13 loops=1)

Planning time : 9.900 ms
Execution time : 92.287 ms