explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Ht03

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

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

2. 2.683 89.029 ↑ 23.2 50 1

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

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

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

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

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

  • Hash Cond: (t1_.id_demande_afci = t9_.id)
5. 1.141 1.141 ↑ 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.141 rows=11,750 loops=1)

6. 3.708 71.948 ↓ 10.1 11,750 1

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

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

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

8. 4.166 49.941 ↓ 10.1 11,750 1

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

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

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

  • Group Key: r8_.id_pers_morale
10. 0.878 0.878 ↑ 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.011..0.878 rows=11,758 loops=1)

11. 4.342 38.752 ↓ 10.3 11,750 1

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

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

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

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

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

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

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

  • Hash Cond: (r5_.mrl_id = t0_.id)
15. 1.382 1.382 ↑ 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.010..1.382 rows=11,751 loops=1)

16. 3.810 21.583 ↓ 5.2 11,750 1

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

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

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

  • Hash Cond: (t0_.parent_id = t6_.id)
18. 7.257 7.257 ↓ 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.016..7.257 rows=11,750 loops=1)

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

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

  • Buckets: 4096 Batches: 1 Memory Usage: 33kB
20. 0.087 5.842 ↑ 376.7 6 1

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

  • Hash Cond: (r7_.mrl_id = t6_.id)
21. 0.005 0.005 ↑ 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.004..0.005 rows=6 loops=1)

22. 3.176 5.750 ↑ 1.0 11,751 1

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

  • Buckets: 16384 Batches: 1 Memory Usage: 542kB
23. 2.574 2.574 ↑ 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.005..2.574 rows=11,751 loops=1)

24. 0.004 0.010 ↓ 1.5 3 1

Hash (cost=1.04..1.04 rows=2 width=166) (actual time=0.010..0.010 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.005..0.006 rows=3 loops=1)

  • Filter: est_principale
  • Rows Removed by Filter: 1
26. 0.016 0.034 ↓ 1.5 30 1

Hash (cost=10.20..10.20 rows=20 width=280) (actual time=0.034..0.034 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.011..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.007 0.011 ↑ 8.5 13 1

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

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

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

Planning time : 8.242 ms
Execution time : 89.365 ms