explain.depesz.com

PostgreSQL's explain analyze made readable

Result: XOWs

Settings
# exclusive inclusive rows x rows loops node
1. 0.009 44.164 ↑ 1.0 50 1

Limit (cost=1,640.63..1,640.75 rows=50 width=427) (actual time=44.150..44.164 rows=50 loops=1)

2. 1.928 44.155 ↑ 22.2 50 1

Sort (cost=1,640.63..1,643.40 rows=1,109 width=427) (actual time=44.149..44.155 rows=50 loops=1)

  • Sort Key: t0_.raison_sociale
  • Sort Method: top-N heapsort Memory: 32kB
3. 6.201 42.227 ↓ 6.2 6,906 1

Hash Left Join (cost=1,396.54..1,603.78 rows=1,109 width=427) (actual time=32.183..42.227 rows=6,906 loops=1)

  • Hash Cond: (t1_.statut_courant = t3_.id)
4. 3.065 36.010 ↓ 6.2 6,906 1

Hash Right Join (cost=1,384.07..1,564.97 rows=1,109 width=485) (actual time=32.143..36.010 rows=6,906 loops=1)

  • Hash Cond: (t1_.id_demande_afci = t9_.id)
5. 0.829 0.829 ↓ 1.0 6,906 1

Seq Scan on t_afci t1_ (cost=0.00..143.97 rows=6,897 width=16) (actual time=0.012..0.829 rows=6,906 loops=1)

6. 2.439 32.116 ↓ 6.2 6,906 1

Hash (cost=1,370.20..1,370.20 rows=1,109 width=477) (actual time=32.116..32.116 rows=6,906 loops=1)

  • Buckets: 8192 (originally 2048) Batches: 1 (originally 1) Memory Usage: 658kB
7. 2.414 29.677 ↓ 6.2 6,906 1

Hash Left Join (cost=1,176.63..1,370.20 rows=1,109 width=477) (actual time=21.053..29.677 rows=6,906 loops=1)

  • Hash Cond: ((max(r8_.id_demande_afci)) = t9_.id)
8. 1.576 24.639 ↓ 6.2 6,906 1

Hash Join (cost=930.20..1,108.53 rows=1,109 width=477) (actual time=18.380..24.639 rows=6,906 loops=1)

  • Hash Cond: (r7_.phy_id = t4_.id)
9. 2.696 23.040 ↓ 6.2 6,906 1

Hash Right Join (cost=919.75..1,092.81 rows=1,109 width=205) (actual time=18.347..23.040 rows=6,906 loops=1)

  • Hash Cond: (r8_.id_pers_morale = t0_.id)
10. 4.102 4.700 ↓ 1.0 6,905 1

HashAggregate (cost=141.53..209.79 rows=6,826 width=8) (actual time=2.685..4.700 rows=6,905 loops=1)

  • Group Key: r8_.id_pers_morale
11. 0.598 0.598 ↓ 1.0 6,914 1

Seq Scan on r_demande_afci_pers_morale r8_ (cost=0.00..107.35 rows=6,835 width=8) (actual time=0.015..0.598 rows=6,914 loops=1)

12. 1.932 15.644 ↓ 6.2 6,906 1

Hash (cost=764.36..764.36 rows=1,109 width=205) (actual time=15.644..15.644 rows=6,906 loops=1)

  • Buckets: 8192 (originally 2048) Batches: 1 (originally 1) Memory Usage: 577kB
13. 1.695 13.712 ↓ 6.2 6,906 1

Hash Join (cost=590.85..764.36 rows=1,109 width=205) (actual time=8.997..13.712 rows=6,906 loops=1)

  • Hash Cond: (r5_.adr_id = t2_.id)
14. 2.341 12.009 ↓ 3.1 6,906 1

Hash Join (cost=579.88..733.97 rows=2,219 width=47) (actual time=8.981..12.009 rows=6,906 loops=1)

  • Hash Cond: (r5_.mrl_id = t0_.id)
15. 0.715 0.715 ↓ 1.0 6,907 1

Seq Scan on r_pers_morale_adresse r5_ (cost=0.00..106.29 rows=6,829 width=8) (actual time=0.006..0.715 rows=6,907 loops=1)

16. 1.495 8.953 ↓ 3.1 6,906 1

Hash (cost=551.76..551.76 rows=2,249 width=43) (actual time=8.953..8.953 rows=6,906 loops=1)

  • Buckets: 8192 (originally 4096) Batches: 1 (originally 1) Memory Usage: 415kB
17. 1.940 7.458 ↓ 3.1 6,906 1

Hash Join (cost=323.65..551.76 rows=2,249 width=43) (actual time=2.683..7.458 rows=6,906 loops=1)

  • Hash Cond: (t0_.parent_id = t6_.id)
18. 2.864 2.864 ↓ 1.0 6,906 1

Seq Scan on t_pers_morale t0_ (cost=0.00..179.81 rows=6,886 width=43) (actual time=0.010..2.864 rows=6,906 loops=1)

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

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

  • Buckets: 4096 Batches: 1 Memory Usage: 33kB
20. 0.040 2.646 ↑ 376.7 6 1

Hash Join (cost=231.72..295.40 rows=2,260 width=12) (actual time=2.644..2.646 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.002..0.003 rows=6 loops=1)

22. 1.330 2.603 ↑ 1.0 6,907 1

Hash (cost=145.21..145.21 rows=6,921 width=4) (actual time=2.603..2.603 rows=6,907 loops=1)

  • Buckets: 8192 Batches: 1 Memory Usage: 307kB
23. 1.273 1.273 ↑ 1.0 6,907 1

Seq Scan on t_pers_morale t6_ (cost=0.00..145.21 rows=6,921 width=4) (actual time=0.003..1.273 rows=6,907 loops=1)

24. 0.004 0.008 ↑ 10.0 3 1

Hash (cost=10.60..10.60 rows=30 width=166) (actual time=0.007..0.008 rows=3 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
25. 0.004 0.004 ↑ 10.0 3 1

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

  • Filter: est_principale
  • Rows Removed by Filter: 1
26. 0.008 0.023 ↓ 1.5 30 1

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

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

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

28. 1.343 2.624 ↓ 1.0 6,910 1

Hash (cost=160.08..160.08 rows=6,908 width=4) (actual time=2.624..2.624 rows=6,910 loops=1)

  • Buckets: 8192 Batches: 1 Memory Usage: 307kB
29. 1.281 1.281 ↓ 1.0 6,910 1

Seq Scan on t_demande_afci t9_ (cost=0.00..160.08 rows=6,908 width=4) (actual time=0.008..1.281 rows=6,910 loops=1)

30. 0.005 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
31. 0.011 0.011 ↑ 8.5 13 1

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

Planning time : 7.431 ms
Execution time : 44.363 ms