explain.depesz.com

PostgreSQL's explain analyze made readable

Result: g8td

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

Sort (cost=203,258.57..203,665.31 rows=162,699 width=215) (actual rows= loops=)

  • Sort Key: l.codepr, (CASE WHEN l.avec_taille THEN l.taillepr ELSE '0'::character varying END)
2. 0.000 0.000 ↓ 0.0

Unique (cost=165,169.51..170,863.98 rows=162,699 width=215) (actual rows= loops=)

3. 0.000 0.000 ↓ 0.0

Sort (cost=165,169.51..165,576.26 rows=162,699 width=215) (actual rows= loops=)

  • Sort Key: l.nompr, l.codepr, (CASE WHEN ((l.codfamille)::text = 'COMPOSANTS'::text) THEN 1 WHEN ((l.famille_base)::text = 'COMPOSANTS'::text) THEN 1 WHEN (substr((l.codepr)::text, 1, 1) = '*'::text) THEN 1 ELSE 0 END), l.avec_taille, (CASE WH (...)
4. 0.000 0.000 ↓ 0.0

Append (cost=101,394.17..134,401.91 rows=162,699 width=215) (actual rows= loops=)

5. 0.000 0.000 ↓ 0.0

GroupAggregate (cost=101,394.17..132,758.47 rows=162,698 width=102) (actual rows= loops=)

  • Group Key: l.codepr, l.nompr, l.avec_taille, (CASE WHEN ((l.codfamille)::text = 'COMPOSANTS'::text) THEN 1 WHEN ((l.famille_base)::text = 'COMPOSANTS'::text) THEN 1 WHEN (substr((l.codepr)::text, 1, 1) = '*'::text) THEN 1 ELSE 0 E (...)
6. 0.000 0.000 ↓ 0.0

Sort (cost=101,394.17..102,197.32 rows=321,261 width=73) (actual rows= loops=)

  • Sort Key: l.codepr, l.nompr, l.avec_taille, (CASE WHEN ((l.codfamille)::text = 'COMPOSANTS'::text) THEN 1 WHEN ((l.famille_base)::text = 'COMPOSANTS'::text) THEN 1 WHEN (substr((l.codepr)::text, 1, 1) = '*'::text) THEN 1 ELS (...)
7. 0.000 0.000 ↓ 0.0

Hash Join (cost=10,180.83..57,732.91 rows=321,261 width=73) (actual rows= loops=)

  • Hash Cond: ((l.numcmde)::text = (c.numcmde)::text)
8. 0.000 0.000 ↓ 0.0

Seq Scan on linecde l (cost=0.00..38,088.59 rows=810,206 width=59) (actual rows= loops=)

  • Filter: ((codfamille)::text <> 'REMA/RQUE'::text)
9. 0.000 0.000 ↓ 0.0

Hash (cost=9,584.47..9,584.47 rows=47,709 width=17) (actual rows= loops=)

10. 0.000 0.000 ↓ 0.0

Index Scan using wdidx_commande_datecde on commande c (cost=0.42..9,584.47 rows=47,709 width=17) (actual rows= loops=)

  • Index Cond: ((datecde >= '2019-01-01'::date) AND (datecde <= '2019-12-31'::date))
  • Filter: (NOT cmdanulle)
11. 0.000 0.000 ↓ 0.0

GroupAggregate (cost=16.35..16.46 rows=1 width=215) (actual rows= loops=)

  • Group Key: l_1.codepr, l_1.nompr, l_1.avec_taille, (CASE WHEN ((l_1.codfamille)::text = 'COMPOSANTS'::text) THEN 1 WHEN ((l_1.famille_base)::text = 'COMPOSANTS'::text) THEN 1 WHEN (substr((l_1.codepr)::text, 1, 1) = '*'::text) THE (...)
12. 0.000 0.000 ↓ 0.0

Sort (cost=16.35..16.35 rows=1 width=223) (actual rows= loops=)

  • Sort Key: l_1.codepr, l_1.nompr, l_1.avec_taille, (CASE WHEN ((l_1.codfamille)::text = 'COMPOSANTS'::text) THEN 1 WHEN ((l_1.famille_base)::text = 'COMPOSANTS'::text) THEN 1 WHEN (substr((l_1.codepr)::text, 1, 1) = '*'::text (...)
13. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.28..16.34 rows=1 width=223) (actual rows= loops=)

14. 0.000 0.000 ↓ 0.0

Index Scan using wdidx_commandeans_datecde on commandeans c_1 (cost=0.14..8.15 rows=1 width=46) (actual rows= loops=)

  • Index Cond: ((datecde >= '2019-01-01'::date) AND (datecde <= '2019-12-31'::date))
  • Filter: (NOT cmdanulle)
15. 0.000 0.000 ↓ 0.0

Index Scan using wdidx_linecdeans_numcmde on linecdeans l_1 (cost=0.14..8.16 rows=1 width=309) (actual rows= loops=)

  • Index Cond: ((numcmde)::text = (c_1.numcmde)::text)
  • Filter: ((codfamille)::text <> 'REMA/RQUE'::text)