explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 5d4K

Settings
# exclusive inclusive rows x rows loops node
1. 0.011 60.097 ↑ 1.0 1 1

Sort (cost=327.31..327.31 rows=1 width=146) (actual time=60.096..60.097 rows=1 loops=1)

  • Sort Key: reglementf0_.datecreationsysteme DESC
  • Sort Method: quicksort Memory: 25kB
2. 0.723 60.086 ↑ 1.0 1 1

Hash Semi Join (cost=221.73..327.30 rows=1 width=146) (actual time=60.085..60.086 rows=1 loops=1)

  • Hash Cond: ((reglementf0_.id)::text = (detailregl2_.id_reglementfournisseur)::text)
  • Join Filter: ((hashed SubPlan 1) OR (SubPlan 2))
  • Rows Removed by Join Filter: 63
3. 0.593 0.862 ↓ 48.0 48 1

Nested Loop Anti Join (cost=0.00..5.71 rows=1 width=146) (actual time=0.026..0.862 rows=48 loops=1)

  • Join Filter: ((reglementf1_.id_reglementannule)::text = (reglementf0_.id)::text)
  • Rows Removed by Join Filter: 2352
4. 0.029 0.029 ↓ 48.0 48 1

Seq Scan on dm4_reglementfournisseur reglementf0_ (cost=0.00..2.61 rows=1 width=146) (actual time=0.008..0.029 rows=48 loops=1)

  • Filter: ((datefinvalidite IS NULL) AND ((id)::text !~~ 'DefaultRecord_%'::text))
  • Rows Removed by Filter: 1
5. 0.240 0.240 ↑ 1.0 49 48

Seq Scan on dm4_reglementfournisseur reglementf1_ (cost=0.00..2.49 rows=49 width=138) (actual time=0.002..0.005 rows=49 loops=48)

6. 0.018 0.048 ↑ 1.0 65 1

Hash (cost=2.66..2.66 rows=66 width=66) (actual time=0.048..0.048 rows=65 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 15kB
7. 0.030 0.030 ↑ 1.0 66 1

Seq Scan on dm4_detailreglementfournisseur detailregl2_ (cost=0.00..2.66 rows=66 width=66) (actual time=0.020..0.030 rows=66 loops=1)

  • Filter: (datefinvalidite IS NULL)
8.          

SubPlan (forHash Semi Join)

9. 0.000 1.109 ↓ 0.0 0 1

Nested Loop (cost=13.90..218.24 rows=1 width=138) (actual time=1.109..1.109 rows=0 loops=1)

  • Join Filter: ((commandeac7_.id)::text = (commandeac7_2_.id)::text)
10. 0.000 1.109 ↓ 0.0 0 1

Nested Loop (cost=13.62..217.49 rows=1 width=237) (actual time=1.109..1.109 rows=0 loops=1)

  • Join Filter: ((commandeac7_.id)::text = (commandeac7_1_.id)::text)
11. 0.000 1.109 ↓ 0.0 0 1

Nested Loop (cost=13.34..216.95 rows=1 width=204) (actual time=1.109..1.109 rows=0 loops=1)

  • Join Filter: ((listerecep5_.id_receptionachat)::text = (receptiona6_2_.id)::text)
12. 0.000 1.109 ↓ 0.0 0 1

Nested Loop (cost=13.06..216.19 rows=1 width=302) (actual time=1.109..1.109 rows=0 loops=1)

  • Join Filter: ((listerecep5_.id_receptionachat)::text = (receptiona6_1_.id)::text)
13. 0.000 1.109 ↓ 0.0 0 1

Nested Loop (cost=12.78..215.65 rows=1 width=269) (actual time=1.109..1.109 rows=0 loops=1)

14. 0.017 0.955 ↑ 1.5 31 1

Nested Loop (cost=12.51..186.00 rows=46 width=236) (actual time=0.204..0.955 rows=31 loops=1)

15. 0.081 0.876 ↑ 1.5 31 1

Nested Loop (cost=12.23..163.77 rows=46 width=171) (actual time=0.199..0.876 rows=31 loops=1)

  • Join Filter: ((avoirsurfa3_.id_factureachat)::text = (listerecep5_.id_facturesurreceptionachat)::text)
  • -> Index Scan using x_dm4_facturesurreceptionachat_receptionachat_01 on dm4_facturesurreceptionachat_receptionachat listerecep5_ (cost=0.27..0.30 rows=1 width=66) (actual time=0.002..0.002 rows=1 loops= (...)
16. 0.009 0.795 ↓ 1.0 37 1

Nested Loop (cost=11.96..152.63 rows=36 width=408) (actual time=0.166..0.795 rows=37 loops=1)

  • Join Filter: ((avoirsurfa3_.id_factureachat)::text = (factureach4_1_.id)::text)
  • Index Cond: ((id_facturesurreceptionachat)::text = (factureach4_3_.id)::text)
17. 0.022 0.712 ↓ 1.0 37 1

Nested Loop (cost=11.69..141.42 rows=36 width=375) (actual time=0.160..0.712 rows=37 loops=1)

  • Join Filter: ((avoirsurfa3_.id_factureachat)::text = (factureach4_3_.id)::text)
18. 0.006 0.616 ↓ 1.0 37 1

Nested Loop (cost=11.40..114.34 rows=36 width=342) (actual time=0.151..0.616 rows=37 loops=1)

  • Join Filter: ((avoirsurfa3_.id_factureachat)::text = (factureach4_2_.id)::text)
19. 0.030 0.536 ↓ 1.0 37 1

Nested Loop (cost=11.13..87.62 rows=36 width=309) (actual time=0.146..0.536 rows=37 loops=1)

  • Join Filter: ((avoirsurfa3_.id)::text = (avoirsurfa3_1_.id)::text)
20. 0.020 0.469 ↓ 1.0 37 1

Nested Loop (cost=10.98..81.31 rows=36 width=408) (actual time=0.139..0.469 rows=37 loops=1)

  • Join Filter: ((avoirsurfa3_.id)::text = (avoirsurfa3_4_.id)::text)
21. 0.125 0.326 ↑ 1.0 41 1

Nested Loop (cost=10.70..49.72 rows=42 width=375) (actual time=0.131..0.326 rows=41 loops=1)

  • Join Filter: ((avoirsurfa3_.id)::text = (avoirsurfa3_3_.id)::text)
  • -> Index Only Scan using dm4_documentcommercialachat_pkey on dm4_documentcommercialachat avoirsurfa3_3_ (cost=0.28..0.64 rows=1 width=33) (actual time=0.002..0.003 ro (...)
22. 0.065 0.201 ↑ 1.0 41 1

Hash Join (cost=10.42..22.49 rows=42 width=342) (actual time=0.118..0.201 rows=41 loops=1)

  • Hash Cond: ((avoirsurfa3_2_.id)::text = (avoirsurfa3_.id)::text)
  • Index Cond: (id = (avoirsurfa3_2_.id)::text)
  • Heap Fetches: 41
23. 0.032 0.032 ↑ 1.0 411 1

Seq Scan on dm4_documentfacturationachat avoirsurfa3_2_ (cost=0.00..10.11 rows=411 width=33) (actual time=0.003..0.032 rows=411 loops=1)

24. 0.013 0.104 ↑ 1.0 41 1

Hash (cost=9.90..9.90 rows=42 width=309) (actual time=0.104..0.104 rows=41 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 14kB
25. 0.046 0.091 ↑ 1.0 41 1

Hash Join (cost=2.05..9.90 rows=42 width=309) (actual time=0.037..0.091 rows=41 loops=1)

  • Hash Cond: ((factureach4_.id)::text = (avoirsurfa3_.id_factureachat)::text)
26. 0.024 0.024 ↑ 1.0 322 1

Seq Scan on dm4_factureachat factureach4_ (cost=0.00..6.22 rows=322 width=33) (actual time=0.003..0.024 rows=322 loops=1)

27. 0.011 0.021 ↑ 1.0 41 1

Hash (cost=1.52..1.52 rows=42 width=276) (actual time=0.021..0.021 rows=41 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 12kB
28. 0.010 0.010 ↑ 1.0 41 1

Seq Scan on dm4_avoirsurfactureachat avoirsurfa3_ (cost=0.00..1.52 rows=42 width=276) (actual time=0.003..0.010 rows=41 loops=1)

  • Filter: ((id)::text !~~ 'DefaultRecord_%'::text)
  • Rows Removed by Filter: 1
29. 0.123 0.123 ↑ 1.0 1 41

Index Scan using dm1_documentcommercial_pkey on dm1_documentcommercial avoirsurfa3_4_ (cost=0.28..0.74 rows=1 width=33) (actual time=0.003..0.003 rows=1 loops=41)

  • Index Cond: ((id)::text = (avoirsurfa3_3_.id)::text)
  • Filter: (datefinvalidite IS NULL)
  • Rows Removed by Filter: 0
30. 0.037 0.037 ↑ 1.0 1 37

Index Only Scan using dm4_avoirachat_pkey on dm4_avoirachat avoirsurfa3_1_ (cost=0.14..0.16 rows=1 width=33) (actual time=0.001..0.001 rows=1 loops=37)

  • Index Cond: (id = (avoirsurfa3_4_.id)::text)
  • Heap Fetches: 37
31. 0.074 0.074 ↑ 1.0 1 37

Index Only Scan using dm4_documentcommercialachat_pkey on dm4_documentcommercialachat factureach4_2_ (cost=0.28..0.73 rows=1 width=33) (actual time=0.001..0.002 rows=1 loops=37)

  • Index Cond: (id = (factureach4_.id)::text)
  • Heap Fetches: 37
32. 0.074 0.074 ↑ 1.0 1 37

Index Only Scan using dm1_documentcommercial_pkey on dm1_documentcommercial factureach4_3_ (cost=0.28..0.74 rows=1 width=33) (actual time=0.002..0.002 rows=1 loops=37)

  • Index Cond: (id = (factureach4_2_.id)::text)
  • Heap Fetches: 37
33. 0.074 0.074 ↑ 1.0 1 37

Index Only Scan using dm4_documentfacturationachat_pkey on dm4_documentfacturationachat factureach4_1_ (cost=0.27..0.30 rows=1 width=33) (actual time=0.002..0.002 rows=1 loops=37)

  • Index Cond: (id = (factureach4_3_.id)::text)
  • Heap Fetches: 37
34. 0.062 0.062 ↑ 1.0 1 31

Index Scan using dm4_receptionachat_pkey on dm4_receptionachat receptiona6_ (cost=0.28..0.47 rows=1 width=65) (actual time=0.002..0.002 rows=1 loops=31)

  • Index Cond: ((id)::text = (listerecep5_.id_receptionachat)::text)
35. 0.155 0.155 ↓ 0.0 0 31

Index Scan using dm4_commandeachat_pkey on dm4_commandeachat commandeac7_ (cost=0.28..0.63 rows=1 width=33) (actual time=0.005..0.005 rows=0 loops=31)

  • Index Cond: ((id)::text = (receptiona6_.id_commandeachat)::text)
  • Filter: ((coalescelower(numerocommandeachat))::text ~~ '%00000635%'::text)
  • Rows Removed by Filter: 1
36. 0.000 0.000 ↓ 0.0 0

Index Only Scan using dm4_documentcommercialachat_pkey on dm4_documentcommercialachat receptiona6_1_ (cost=0.28..0.53 rows=1 width=33) (never executed)

  • Index Cond: (id = (receptiona6_.id)::text)
  • Heap Fetches: 0
37. 0.000 0.000 ↓ 0.0 0

Index Only Scan using dm1_documentcommercial_pkey on dm1_documentcommercial receptiona6_2_ (cost=0.28..0.74 rows=1 width=33) (never executed)

  • Index Cond: (id = (receptiona6_1_.id)::text)
  • Heap Fetches: 0
38. 0.000 0.000 ↓ 0.0 0

Index Only Scan using dm4_documentcommercialachat_pkey on dm4_documentcommercialachat commandeac7_1_ (cost=0.28..0.53 rows=1 width=33) (never executed)

  • Index Cond: (id = (receptiona6_.id_commandeachat)::text)
  • Heap Fetches: 0
39. 0.000 0.000 ↓ 0.0 0

Index Only Scan using dm1_documentcommercial_pkey on dm1_documentcommercial commandeac7_2_ (cost=0.28..0.74 rows=1 width=33) (never executed)

  • Index Cond: (id = (commandeac7_1_.id)::text)
  • Heap Fetches: 0
40. 0.000 57.344 ↑ 1.0 1 64

Result (cost=3.04..196.61 rows=1 width=33) (actual time=0.827..0.896 rows=1 loops=64)

  • One-Time Filter: ((detailregl2_.id_reglementfournisseur)::text = (reglementf0_.id)::text)
41. 0.128 57.344 ↑ 1.0 1 64

Nested Loop (cost=3.04..196.61 rows=1 width=33) (actual time=0.827..0.896 rows=1 loops=64)

  • Join Filter: ((commandeac11_.id)::text = (commandeac11_2_.id)::text)
42. 0.000 57.088 ↑ 1.0 1 64

Nested Loop (cost=2.76..195.85 rows=1 width=132) (actual time=0.824..0.892 rows=1 loops=64)

  • Join Filter: ((facturesur8_.id)::text = (facturesur8_2_.id)::text)
43. 0.064 56.896 ↑ 1.0 1 64

Nested Loop (cost=2.49..195.54 rows=1 width=264) (actual time=0.821..0.889 rows=1 loops=64)

  • Join Filter: ((facturesur8_.id)::text = (facturesur8_1_.id)::text)
44. 0.064 56.704 ↑ 1.0 1 64

Nested Loop (cost=2.21..195.23 rows=1 width=231) (actual time=0.818..0.886 rows=1 loops=64)

  • Join Filter: ((facturesur8_3_.id)::text = (facturesur8_.id)::text)
45. 0.064 56.448 ↑ 1.0 1 64

Nested Loop (cost=1.95..194.92 rows=1 width=198) (actual time=0.815..0.882 rows=1 loops=64)

46. 0.064 56.128 ↓ 2.0 2 64

Nested Loop (cost=1.66..194.17 rows=1 width=165) (actual time=0.808..0.877 rows=2 loops=64)

47. 0.256 55.808 ↓ 2.0 2 64

Nested Loop (cost=1.39..193.42 rows=1 width=132) (actual time=0.805..0.872 rows=2 loops=64)

  • Join Filter: ((receptiona10_.id)::text = (listerecep9_.id_receptionachat)::text)
  • -> Index Scan using x_dm4_facturesurreceptionachat_receptionachat_02 on dm4_facturesurreceptionachat_receptionachat listerecep9_ (cost=0.27..0.31 rows=2 width=66) (actual time=0.003..0.003 rows=2 (...)
48. 0.000 55.552 ↑ 1.0 1 64

Nested Loop (cost=1.11..193.08 rows=1 width=197) (actual time=0.802..0.868 rows=1 loops=64)

  • Join Filter: ((receptiona10_.id)::text = (receptiona10_2_.id)::text)
  • Index Cond: ((id_receptionachat)::text = (receptiona10_2_.id)::text)
49. 0.064 55.424 ↑ 1.0 1 64

Nested Loop (cost=0.83..192.32 rows=1 width=164) (actual time=0.800..0.866 rows=1 loops=64)

50. 0.128 55.232 ↑ 1.0 1 64

Nested Loop (cost=0.55..191.78 rows=1 width=131) (actual time=0.797..0.863 rows=1 loops=64)

  • Join Filter: ((commandeac11_.id)::text = (receptiona10_.id_commandeachat)::text)
51. 0.256 54.976 ↑ 1.0 1 64

Nested Loop (cost=0.28..191.44 rows=1 width=66) (actual time=0.794..0.859 rows=1 loops=64)

  • -> Index Only Scan using dm4_documentcommercialachat_pkey on dm4_documentcommercialachat commandeac11_1_ (cost=0.28..7.29 rows=1 width=33) (actual time=0.003..0.003 rows=1 (...)
52. 54.720 54.720 ↑ 1.0 1 64

Seq Scan on dm4_commandeachat commandeac11_ (cost=0.00..184.14 rows=1 width=33) (actual time=0.790..0.855 rows=1 loops=64)

  • Filter: ((coalescelower(numerocommandeachat))::text ~~ '%00000635%'::text)
  • Rows Removed by Filter: 672
  • Index Cond: (id = (commandeac11_.id)::text)
  • Heap Fetches: 64
53. 0.128 0.128 ↑ 1.0 1 64

Index Scan using x_dm4_receptionachat_01 on dm4_receptionachat receptiona10_ (cost=0.28..0.32 rows=1 width=65) (actual time=0.002..0.002 rows=1 loops=64)

  • Index Cond: ((id_commandeachat)::text = (commandeac11_1_.id)::text)
54. 0.128 0.128 ↑ 1.0 1 64

Index Only Scan using dm4_documentcommercialachat_pkey on dm4_documentcommercialachat receptiona10_1_ (cost=0.28..0.53 rows=1 width=33) (actual time=0.002..0.002 rows=1 loops=64)

  • Index Cond: (id = (receptiona10_.id)::text)
  • Heap Fetches: 64
55. 0.128 0.128 ↑ 1.0 1 64

Index Only Scan using dm1_documentcommercial_pkey on dm1_documentcommercial receptiona10_2_ (cost=0.28..0.74 rows=1 width=33) (actual time=0.002..0.002 rows=1 loops=64)

  • Index Cond: (id = (receptiona10_1_.id)::text)
  • Heap Fetches: 64
56. 0.256 0.256 ↑ 1.0 1 128

Index Only Scan using dm4_documentcommercialachat_pkey on dm4_documentcommercialachat facturesur8_3_ (cost=0.28..0.75 rows=1 width=33) (actual time=0.002..0.002 rows=1 loops=128)

  • Index Cond: (id = (listerecep9_.id_facturesurreceptionachat)::text)
  • Heap Fetches: 128
57. 0.256 0.256 ↑ 1.0 1 128

Index Scan using dm1_documentcommercial_pkey on dm1_documentcommercial facturesur8_4_ (cost=0.28..0.74 rows=1 width=33) (actual time=0.002..0.002 rows=1 loops=128)

  • Index Cond: ((id)::text = (facturesur8_3_.id)::text)
  • Filter: (datefinvalidite IS NULL)
  • Rows Removed by Filter: 1
58. 0.192 0.192 ↑ 1.0 1 64

Index Only Scan using dm4_facturesurreceptionachat_pkey on dm4_facturesurreceptionachat facturesur8_ (cost=0.27..0.30 rows=1 width=33) (actual time=0.002..0.003 rows=1 loops=64)

  • Index Cond: (id = (facturesur8_4_.id)::text)
  • Filter: ((id)::text !~~ 'DefaultRecord_%'::text)
  • Heap Fetches: 64
59. 0.128 0.128 ↑ 1.0 1 64

Index Only Scan using dm4_factureachat_pkey on dm4_factureachat facturesur8_1_ (cost=0.27..0.30 rows=1 width=33) (actual time=0.002..0.002 rows=1 loops=64)

  • Index Cond: (id = (facturesur8_4_.id)::text)
  • Heap Fetches: 64
60. 0.192 0.192 ↑ 1.0 1 64

Index Only Scan using dm4_documentfacturationachat_pkey on dm4_documentfacturationachat facturesur8_2_ (cost=0.27..0.30 rows=1 width=33) (actual time=0.002..0.003 rows=1 loops=64)

  • Index Cond: (id = (facturesur8_4_.id)::text)
  • Heap Fetches: 64
61. 0.128 0.128 ↑ 1.0 1 64

Index Only Scan using dm1_documentcommercial_pkey on dm1_documentcommercial commandeac11_2_ (cost=0.28..0.74 rows=1 width=33) (actual time=0.002..0.002 rows=1 loops=64)

  • Index Cond: (id = (commandeac11_1_.id)::text)
  • Heap Fetches: 64
Planning time : 5,956.962 ms
Execution time : 60.823 ms