explain.depesz.com

PostgreSQL's explain analyze made readable

Result: XGnu

Settings

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 3.304 11,130.791 ↑ 2,022.8 17 1

GroupAggregate (cost=3,306,336.23..3,308,216.63 rows=34,387 width=38) (actual time=11,126.443..11,130.791 rows=17 loops=1)

  • Group Key: vcarticle.vcarticle_tag
2. 5.775 11,127.487 ↑ 4.7 19,537 1

Sort (cost=3,306,336.23..3,306,563.66 rows=90,973 width=38) (actual time=11,126.432..11,127.487 rows=19,537 loops=1)

  • Sort Key: vcarticle.vcarticle_tag
  • Sort Method: quicksort Memory: 2295kB
3. 5.443 11,121.712 ↑ 4.7 19,537 1

Hash Join (cost=1,491,938.63..3,298,843.17 rows=90,973 width=38) (actual time=7,323.356..11,121.712 rows=19,537 loops=1)

  • Hash Cond: (vcentete.vcentete_adhetablissement_id = adhetablissement.adhetablissement_id)
4. 19.497 11,116.074 ↑ 10.9 25,137 1

Nested Loop (cost=1,491,922.48..3,296,894.66 rows=272,919 width=46) (actual time=7,323.154..11,116.074 rows=25,137 loops=1)

5. 767.106 11,021.166 ↑ 10.9 25,137 1

Hash Join (cost=1,491,922.05..2,973,353.38 rows=274,116 width=46) (actual time=7,323.139..11,021.166 rows=25,137 loops=1)

  • Hash Cond: (vcligne.vcligne_vcarticle_id = vcarticle.vcarticle_id)
6. 2,954.198 3,400.498 ↓ 1.0 3,144,579 1

Bitmap Heap Scan on vcligne (cost=86,530.85..1,497,568.43 rows=3,052,956 width=36) (actual time=465.121..3,400.498 rows=3,144,579 loops=1)

  • Recheck Cond: ((vcligne_dossier_id = 15) AND (vcligne_date >= '2018-10-04 00:00:00'::timestamp without time zone) AND (vcligne_date <= '2019-10-04 23:59:59'::timestamp without time zone))
  • Rows Removed by Index Recheck: 1823048
  • Filter: ((vcligne_typelotcalc)::text = ANY ('{"Article simple","Article lot détail","Article assemblé détail"}'::text[]))
  • Rows Removed by Filter: 397
  • Heap Blocks: exact=95669 lossy=331038
7. 446.300 446.300 ↓ 1.0 3,165,931 1

Bitmap Index Scan on vcligne_date_sk (cost=0.00..85,767.61 rows=3,055,604 width=0) (actual time=446.300..446.300 rows=3,165,931 loops=1)

  • Index Cond: ((vcligne_dossier_id = 15) AND (vcligne_date >= '2018-10-04 00:00:00'::timestamp without time zone) AND (vcligne_date <= '2019-10-04 23:59:59'::timestamp without time zone))
8. 25.606 6,853.562 ↑ 15.3 95,073 1

Hash (cost=1,378,758.51..1,378,758.51 rows=1,450,615 width=22) (actual time=6,853.562..6,853.562 rows=95,073 loops=1)

  • Buckets: 262144 Batches: 16 Memory Usage: 2347kB
9. 6,827.956 6,827.956 ↑ 15.3 95,073 1

Seq Scan on vcarticle (cost=0.00..1,378,758.51 rows=1,450,615 width=22) (actual time=0.025..6,827.956 rows=95,073 loops=1)

  • Filter: ((vcarticle_dossier_id = 15) AND ((COALESCE(vcarticle_tag, 'article non renseigné'::character varying))::text = ANY ('{INCONNU,TRANS,FMAGIM-18900,FMAGIM-18903,FRIVIE-QPL370,FBRONC-GS01,FMAGIM-18904,FMARKB-1673,FSEMA-72512,FCARAM-1201RDN,FCOUZO-SALPSH029T00,FBASTI-963026,FAOC-80024,FSTAUB-1202023,FNIJI-CS167-BU,FJELLY-FLA2LF,FBAMIX-MX150060,RECHAP}'::text[])))
  • Rows Removed by Filter: 16063512
10. 75.411 75.411 ↑ 1.0 1 25,137

Index Scan using vcentete_pk on vcentete (cost=0.43..1.17 rows=1 width=12) (actual time=0.003..0.003 rows=1 loops=25,137)

  • Index Cond: (vcentete_id = vcligne.vcligne_vcentete_id)
  • Filter: (vcentete_dossier_id = 15)
11. 0.027 0.195 ↓ 1.0 109 1

Hash (cost=14.81..14.81 rows=107 width=8) (actual time=0.195..0.195 rows=109 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 13kB
12. 0.168 0.168 ↓ 1.0 109 1

Seq Scan on adhetablissement (cost=0.00..14.81 rows=107 width=8) (actual time=0.013..0.168 rows=109 loops=1)

  • Filter: ((adhetablissement_dossier_id = 15) AND ((adhetablissement_enseignelib)::text = 'Ambiance & Styles'::text))
  • Rows Removed by Filter: 219
Planning time : 1.336 ms