explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Jt4z

Settings
# exclusive inclusive rows x rows loops node
1. 89.222 1,789.531 ↑ 1.0 51,353 1

Group (cost=12,218.44..5,301,139.32 rows=51,354 width=117) (actual time=116.270..1,789.531 rows=51,353 loops=1)

2. 101.163 148.133 ↑ 1.0 51,353 1

Sort (cost=12,218.44..12,346.83 rows=51,354 width=117) (actual time=116.158..148.133 rows=51,353 loops=1)

  • Sort Key: this_.id_bien, affaire2_.id_affaire
  • Sort Method: external merge Disk: 6032kB
3. 7.259 46.970 ↑ 1.0 51,353 1

Hash Left Join (cost=1.74..5,039.95 rows=51,354 width=117) (actual time=0.043..46.970 rows=51,353 loops=1)

  • Hash Cond: (this_.id_bien = immeuble1_.id_bien)
4. 13.620 39.702 ↑ 1.0 51,353 1

Merge Join (cost=0.00..4,845.30 rows=51,354 width=117) (actual time=0.012..39.702 rows=51,353 loops=1)

  • Merge Cond: (affaire2_.id_affaire = this_.id_affaire)
5. 5.518 5.518 ↑ 1.0 27,035 1

Index Scan using affaire_pkey on affaire affaire2_ (cost=0.00..1,329.99 rows=28,055 width=20) (actual time=0.005..5.518 rows=27,035 loops=1)

6. 20.564 20.564 ↑ 1.0 51,354 1

Index Scan using index_affaire on bien this_ (cost=0.00..2,804.02 rows=51,366 width=101) (actual time=0.005..20.564 rows=51,354 loops=1)

  • Filter: ((etat_archive >= 1) AND (etat_archive <= 4))
  • Rows Removed by Filter: 1
7. 0.002 0.009 ↑ 1.0 33 1

Hash (cost=1.33..1.33 rows=33 width=4) (actual time=0.009..0.009 rows=33 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 2kB
8. 0.007 0.007 ↑ 1.0 33 1

Seq Scan on immeuble immeuble1_ (cost=0.00..1.33 rows=33 width=4) (actual time=0.003..0.007 rows=33 loops=1)

9.          

SubPlan (forGroup)

10. 51.353 102.706 ↑ 1.0 1 51,353

Aggregate (cost=8.27..8.28 rows=1 width=5) (actual time=0.002..0.002 rows=1 loops=51,353)

11. 51.353 51.353 ↑ 1.0 1 51,353

Index Scan using index_ajustement on ajustement (cost=0.00..8.27 rows=1 width=5) (actual time=0.001..0.001 rows=1 loops=51,353)

  • Index Cond: (id_bien = this_.id_bien)
12. 51.353 102.706 ↑ 1.0 1 51,353

Aggregate (cost=8.28..8.29 rows=1 width=5) (actual time=0.002..0.002 rows=1 loops=51,353)

13. 51.353 51.353 ↑ 1.0 1 51,353

Index Scan using index_ajustement on ajustement (cost=0.00..8.27 rows=1 width=5) (actual time=0.001..0.001 rows=1 loops=51,353)

  • Index Cond: (id_bien = this_.id_bien)
  • Filter: ((sens)::text = 'Crédit'::text)
  • Rows Removed by Filter: 0
14. 0.000 51.353 ↑ 1.0 1 51,353

Aggregate (cost=8.28..8.29 rows=1 width=5) (actual time=0.001..0.001 rows=1 loops=51,353)

15. 51.353 51.353 ↓ 0.0 0 51,353

Index Scan using index_ajustement on ajustement (cost=0.00..8.27 rows=1 width=5) (actual time=0.001..0.001 rows=0 loops=51,353)

  • Index Cond: (id_bien = this_.id_bien)
  • Filter: ((sens)::text = 'Débit'::text)
  • Rows Removed by Filter: 1
16. 359.471 513.530 ↓ 0.0 0 51,353

GroupAggregate (cost=0.00..1.31 rows=1 width=520) (actual time=0.010..0.010 rows=0 loops=51,353)

17. 154.059 154.059 ↓ 0.0 0 51,353

Seq Scan on fondement_juridique (cost=0.00..1.28 rows=1 width=520) (actual time=0.003..0.003 rows=0 loops=51,353)

  • Filter: ((mesure = 0) AND (id_bien = this_.id_bien))
  • Rows Removed by Filter: 19
18. 308.118 410.824 ↓ 0.0 0 51,353

GroupAggregate (cost=0.00..1.31 rows=1 width=520) (actual time=0.008..0.008 rows=0 loops=51,353)

19. 102.706 102.706 ↓ 0.0 0 51,353

Seq Scan on fondement_juridique (cost=0.00..1.28 rows=1 width=520) (actual time=0.002..0.002 rows=0 loops=51,353)

  • Filter: ((mesure = 1) AND (id_bien = this_.id_bien))
  • Rows Removed by Filter: 19
20. 154.059 256.765 ↑ 1.0 1 51,353

Aggregate (cost=25.16..25.17 rows=1 width=4) (actual time=0.005..0.005 rows=1 loops=51,353)

21. 46.791 102.706 ↓ 0.0 0 51,353

Nested Loop (cost=0.00..25.16 rows=1 width=4) (actual time=0.002..0.002 rows=0 loops=51,353)

22. 0.000 51.353 ↓ 0.0 0 51,353

Nested Loop (cost=0.00..16.88 rows=1 width=8) (actual time=0.001..0.001 rows=0 loops=51,353)

23. 0.000 51.353 ↓ 0.0 0 51,353

Nested Loop (cost=0.00..16.55 rows=1 width=12) (actual time=0.001..0.001 rows=0 loops=51,353)

24. 51.353 51.353 ↓ 0.0 0 51,353

Index Only Scan using id_asso_bien_restitution on asso_bien_restitution a (cost=0.00..8.27 rows=1 width=8) (actual time=0.001..0.001 rows=0 loops=51,353)

  • Index Cond: (id_bien = this_.id_bien)
  • Heap Fetches: 1933
25. 3.866 3.866 ↑ 1.0 1 1,933

Index Only Scan using index_id_restitution_hitorique_restitution on historique_restitution hr (cost=0.00..8.27 rows=1 width=4) (actual time=0.002..0.002 rows=1 loops=1,933)

  • Index Cond: (id_restitution = a.id_restitution)
  • Heap Fetches: 2281
26. 2.281 2.281 ↑ 1.0 1 2,281

Index Only Scan using id_restitution on restitution r (cost=0.00..0.32 rows=1 width=4) (actual time=0.001..0.001 rows=1 loops=2,281)

  • Index Cond: (id_restitution = hr.id_restitution)
  • Heap Fetches: 2281
27. 4.562 4.562 ↑ 1.0 1 2,281

Index Only Scan using bien_pkey on bien b1 (cost=0.00..8.27 rows=1 width=4) (actual time=0.002..0.002 rows=1 loops=2,281)

  • Index Cond: (id_bien = this_.id_bien)
  • Heap Fetches: 2281
28. 0.000 102.706 ↑ 1.0 1 51,353

Aggregate (cost=25.16..25.17 rows=1 width=0) (actual time=0.002..0.002 rows=1 loops=51,353)

29. 49.072 102.706 ↓ 0.0 0 51,353

Nested Loop (cost=0.00..25.16 rows=1 width=0) (actual time=0.001..0.002 rows=0 loops=51,353)

30. 0.000 51.353 ↓ 0.0 0 51,353

Nested Loop (cost=0.00..16.88 rows=1 width=4) (actual time=0.001..0.001 rows=0 loops=51,353)

31. 0.000 51.353 ↓ 0.0 0 51,353

Nested Loop (cost=0.00..16.55 rows=1 width=12) (actual time=0.001..0.001 rows=0 loops=51,353)

32. 51.353 51.353 ↓ 0.0 0 51,353

Index Only Scan using id_asso_bien_restitution on asso_bien_restitution a (cost=0.00..8.27 rows=1 width=8) (actual time=0.001..0.001 rows=0 loops=51,353)

  • Index Cond: (id_bien = this_.id_bien)
  • Heap Fetches: 1933
33. 1.933 1.933 ↑ 1.0 1 1,933

Index Only Scan using index_id_restitution_hitorique_restitution on historique_restitution hr (cost=0.00..8.27 rows=1 width=4) (actual time=0.001..0.001 rows=1 loops=1,933)

  • Index Cond: (id_restitution = a.id_restitution)
  • Heap Fetches: 2281
34. 2.281 2.281 ↑ 1.0 1 2,281

Index Only Scan using id_restitution on restitution r (cost=0.00..0.32 rows=1 width=4) (actual time=0.001..0.001 rows=1 loops=2,281)

  • Index Cond: (id_restitution = hr.id_restitution)
  • Heap Fetches: 2281
35. 2.281 2.281 ↑ 1.0 1 2,281

Index Only Scan using bien_pkey on bien b1 (cost=0.00..8.27 rows=1 width=4) (actual time=0.001..0.001 rows=1 loops=2,281)

  • Index Cond: (id_bien = this_.id_bien)
  • Heap Fetches: 2281
36. 0.000 11.586 ↑ 1.0 1 1,931

Limit (cost=0.00..25.16 rows=1 width=10) (actual time=0.006..0.006 rows=1 loops=1,931)

37. 0.000 11.586 ↑ 1.0 1 1,931

Nested Loop (cost=0.00..25.16 rows=1 width=10) (actual time=0.006..0.006 rows=1 loops=1,931)

38. 1.931 9.655 ↑ 1.0 1 1,931

Nested Loop (cost=0.00..16.88 rows=1 width=14) (actual time=0.005..0.005 rows=1 loops=1,931)

39. 1.931 5.793 ↑ 1.0 1 1,931

Nested Loop (cost=0.00..16.55 rows=1 width=12) (actual time=0.003..0.003 rows=1 loops=1,931)

40. 1.931 1.931 ↑ 1.0 1 1,931

Index Only Scan using id_asso_bien_restitution on asso_bien_restitution a (cost=0.00..8.27 rows=1 width=8) (actual time=0.001..0.001 rows=1 loops=1,931)

  • Index Cond: (id_bien = this_.id_bien)
  • Heap Fetches: 1931
41. 1.931 1.931 ↑ 1.0 1 1,931

Index Only Scan using index_id_restitution_hitorique_restitution on historique_restitution hr (cost=0.00..8.27 rows=1 width=4) (actual time=0.001..0.001 rows=1 loops=1,931)

  • Index Cond: (id_restitution = a.id_restitution)
  • Heap Fetches: 1931
42. 1.931 1.931 ↑ 1.0 1 1,931

Index Scan using id_restitution on restitution r (cost=0.00..0.32 rows=1 width=14) (actual time=0.001..0.001 rows=1 loops=1,931)

  • Index Cond: (id_restitution = hr.id_restitution)
43. 1.931 1.931 ↑ 1.0 1 1,931

Index Only Scan using bien_pkey on bien b1 (cost=0.00..8.27 rows=1 width=4) (actual time=0.001..0.001 rows=1 loops=1,931)

  • Index Cond: (id_bien = this_.id_bien)
  • Heap Fetches: 1931