explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Dqll

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 0.000 ↓ 0.0

Unique (cost=1,212,324.79..1,212,325.23 rows=25 width=68) (actual rows= loops=)

2. 0.000 0.000 ↓ 0.0

Sort (cost=1,212,324.79..1,212,324.86 rows=25 width=68) (actual rows= loops=)

  • Sort Key: commandeve0_.datecommandevente, commandeve0_.id, commandeve0_.numerocommandevente, cliententi2_1_.abrege, (min(listeligne1_.datelivraisonacceptee)), commandeve0_2_.reference
3. 0.000 0.000 ↓ 0.0

HashAggregate (cost=1,212,323.96..1,212,324.21 rows=25 width=68) (actual rows= loops=)

  • Group Key: commandeve0_.datecommandevente, commandeve0_.id, commandeve0_.numerocommandevente, cliententi2_1_.abrege, commandeve0_2_.reference
4. 0.000 0.000 ↓ 0.0

Nested Loop (cost=1,071,439.90..1,212,323.59 rows=25 width=68) (actual rows= loops=)

  • Join Filter: ((listeligne1_.id)::text = (listeligne1_1_.id)::text)
5. 0.000 0.000 ↓ 0.0

Hash Join (cost=1,071,439.62..1,212,315.21 rows=25 width=134) (actual rows= loops=)

  • Hash Cond: (((commandeve0_.id)::text = (commandeve0_1_.id)::text) AND ((cliententi2_.id)::text = (commandeve0_1_.id_client)::text) AND ((adresseent7_.id)::text = (commandeve0_1_.id_adresseemetteur)::text))
6. 0.000 0.000 ↓ 0.0

Hash Join (cost=1,071,265.96..1,192,004.22 rows=1,789,963 width=296) (actual rows= loops=)

  • Hash Cond: ((listeligne1_2_.id_article)::text = (articleent3_.id)::text)
7. 0.000 0.000 ↓ 0.0

Hash Join (cost=472.66..961.57 rows=1,275 width=217) (actual rows= loops=)

  • Hash Cond: ((listeligne1_.id_commandevente)::text = (commandeve0_.id)::text)
8. 0.000 0.000 ↓ 0.0

Hash Join (cost=96.82..567.87 rows=1,363 width=136) (actual rows= loops=)

  • Hash Cond: ((listeligne1_2_.id)::text = (listeligne1_.id)::text)
9. 0.000 0.000 ↓ 0.0

Seq Scan on dm1_lignedocumentcommercial listeligne1_2_ (cost=0.00..430.84 rows=7,089 width=66) (actual rows= loops=)

  • Filter: ((datefinvalidite IS NULL) AND (quantite_valeur > '0'::numeric))
10. 0.000 0.000 ↓ 0.0

Hash (cost=77.62..77.62 rows=1,536 width=70) (actual rows= loops=)

11. 0.000 0.000 ↓ 0.0

Seq Scan on dm2_lignecommandevente listeligne1_ (cost=0.00..77.62 rows=1,536 width=70) (actual rows= loops=)

  • Filter: ((NOT etatproduction) AND statutrevue AND ((id)::text !~~ 'DefaultRecord_%'::text) AND ((etatlivraison)::text <> '2'::text))
12. 0.000 0.000 ↓ 0.0

Hash (cost=360.52..360.52 rows=1,226 width=81) (actual rows= loops=)

13. 0.000 0.000 ↓ 0.0

Hash Join (cost=66.70..360.52 rows=1,226 width=81) (actual rows= loops=)

  • Hash Cond: ((commandeve0_2_.id)::text = (commandeve0_.id)::text)
14. 0.000 0.000 ↓ 0.0

Seq Scan on dm1_documentcommercial commandeve0_2_ (cost=0.00..263.88 rows=4,715 width=36) (actual rows= loops=)

  • Filter: (datefinvalidite IS NULL)
15. 0.000 0.000 ↓ 0.0

Hash (cost=50.48..50.48 rows=1,297 width=45) (actual rows= loops=)

16. 0.000 0.000 ↓ 0.0

Seq Scan on dm2_commandevente commandeve0_ (cost=0.00..50.48 rows=1,297 width=45) (actual rows= loops=)

  • Filter: (((id)::text !~~ 'DefaultRecord_%'::text) AND (datecommandevente <= '2019-07-03'::date))
17. 0.000 0.000 ↓ 0.0

Hash (cost=920,583.14..920,583.14 rows=4,550,733 width=144) (actual rows= loops=)

18. 0.000 0.000 ↓ 0.0

Hash Semi Join (cost=16.41..920,583.14 rows=4,550,733 width=144) (actual rows= loops=)

  • Hash Cond: ((adresseent7_.id_etablissement)::text = (etablissem10_.id)::text)
19. 0.000 0.000 ↓ 0.0

Nested Loop (cost=10.96..719,188.12 rows=57,433,398 width=156) (actual rows= loops=)

20. 0.000 0.000 ↓ 0.0

Nested Loop (cost=10.96..934.49 rows=70,818 width=124) (actual rows= loops=)

21. 0.000 0.000 ↓ 0.0

Seq Scan on dm1_adresse adresseent7_ (cost=0.00..14.07 rows=407 width=44) (actual rows= loops=)

22. 0.000 0.000 ↓ 0.0

Materialize (cost=10.96..35.62 rows=174 width=80) (actual rows= loops=)

23. 0.000 0.000 ↓ 0.0

Hash Join (cost=10.96..34.75 rows=174 width=80) (actual rows= loops=)

  • Hash Cond: ((cliententi2_1_.id)::text = (cliententi2_.id)::text)
24. 0.000 0.000 ↓ 0.0

Seq Scan on dm1_tiers cliententi2_1_ (cost=0.00..20.90 rows=308 width=48) (actual rows= loops=)

  • Filter: ((statutcomptable)::text <> '2'::text)
25. 0.000 0.000 ↓ 0.0

Hash (cost=8.76..8.76 rows=176 width=32) (actual rows= loops=)

26. 0.000 0.000 ↓ 0.0

Seq Scan on dm2_client cliententi2_ (cost=0.00..8.76 rows=176 width=32) (actual rows= loops=)

27. 0.000 0.000 ↓ 0.0

Materialize (cost=0.00..338.19 rows=811 width=32) (actual rows= loops=)

28. 0.000 0.000 ↓ 0.0

Seq Scan on dm1_article articleent3_ (cost=0.00..334.13 rows=811 width=32) (actual rows= loops=)

  • Filter: (((typearticle)::text <> '4'::text) AND ((origine)::text = '2'::text) AND ((strategieproduction)::text = '2'::text))
29. 0.000 0.000 ↓ 0.0

Hash (cost=5.41..5.41 rows=3 width=22) (actual rows= loops=)

30. 0.000 0.000 ↓ 0.0

HashAggregate (cost=5.35..5.38 rows=3 width=22) (actual rows= loops=)

  • Group Key: etablissem10_.id
31. 0.000 0.000 ↓ 0.0

Hash Join (cost=1.07..5.34 rows=3 width=22) (actual rows= loops=)

  • Hash Cond: ((listeetabl9_.id_etablissement)::text = (etablissem10_.id)::text)
32. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.00..4.23 rows=3 width=19) (actual rows= loops=)

33. 0.000 0.000 ↓ 0.0

Seq Scan on dm1_utilisateur utilisateu8_ (cost=0.00..2.46 rows=1 width=30) (actual rows= loops=)

  • Filter: (((id)::text = '402881973205e5cc013205f2cdbf0036'::text) AND (dtype = 'N'::bpchar))
34. 0.000 0.000 ↓ 0.0

Seq Scan on dm1_utilisateur_etablissement listeetabl9_ (cost=0.00..1.74 rows=3 width=49) (actual rows= loops=)

  • Filter: ((id_utilisateur)::text = '402881973205e5cc013205f2cdbf0036'::text)
35. 0.000 0.000 ↓ 0.0

Hash (cost=1.03..1.03 rows=3 width=22) (actual rows= loops=)

36. 0.000 0.000 ↓ 0.0

Seq Scan on dm1_etablissement etablissem10_ (cost=0.00..1.03 rows=3 width=22) (actual rows= loops=)

37. 0.000 0.000 ↓ 0.0

Hash (cost=120.42..120.42 rows=3,042 width=99) (actual rows= loops=)

38. 0.000 0.000 ↓ 0.0

Seq Scan on dm2_documentcommercialvente commandeve0_1_ (cost=0.00..120.42 rows=3,042 width=99) (actual rows= loops=)

39. 0.000 0.000 ↓ 0.0

Index Only Scan using dm2_lignedocumentcommercialvente_pkey on dm2_lignedocumentcommercialvente listeligne1_1_ (cost=0.28..0.32 rows=1 width=33) (actual rows= loops=)

  • Index Cond: (id = (listeligne1_2_.id)::text)