explain.depesz.com

PostgreSQL's explain analyze made readable

Result: yqwb

Settings
# exclusive inclusive rows x rows loops node
1. 7,435.760 15,596.956 ↓ 0.0 0 1

Update on vente (cost=1,379.16..7,137,168.11 rows=5,082 width=213) (actual time=15,596.956..15,596.956 rows=0 loops=1)

  • Buffers: shared hit=11,166,043 read=1,028 dirtied=7,995 written=6,719
2. 272.286 8,161.196 ↓ 48.0 243,945 1

Nested Loop (cost=1,379.16..7,137,168.11 rows=5,082 width=213) (actual time=527.397..8,161.196 rows=243,945 loops=1)

  • Buffers: shared hit=5,542,999 read=73 dirtied=18
3. 158.622 6,669.185 ↓ 48.0 243,945 1

Nested Loop (cost=1,378.59..7,095,532.36 rows=5,082 width=40) (actual time=527.349..6,669.185 rows=243,945 loops=1)

  • Buffers: shared hit=3,957,350 read=73 dirtied=18
4. 339.355 1,752.533 ↑ 1.0 793,005 1

Hash Join (cost=1,378.02..151,525.54 rows=807,208 width=46) (actual time=527.301..1,752.533 rows=793,005 loops=1)

  • Hash Cond: ((dvj.code_magasin)::text = (m.code)::text)
  • Buffers: shared hit=53,610
5. 485.920 1,412.311 ↑ 1.0 793,005 1

Hash Join (cost=1,294.74..149,317.26 rows=807,208 width=37) (actual time=526.421..1,412.311 rows=793,005 loops=1)

  • Hash Cond: ((dvj.code_article)::text = (a.code)::text)
  • Buffers: shared hit=53,560
6. 913.783 913.783 ↑ 1.0 793,005 1

Seq Scan on derniere_vente_journee dvj (cost=0.00..145,903.15 rows=807,208 width=28) (actual time=513.689..913.783 rows=793,005 loops=1)

  • Filter: ((journee >= '2020-07-25'::date) AND (journee <= '2020-07-28'::date))
  • Rows Removed by Filter: 5,419,020
  • Buffers: shared hit=52,716
7. 4.253 12.608 ↑ 1.0 20,019 1

Hash (cost=1,044.33..1,044.33 rows=20,033 width=19) (actual time=12.607..12.608 rows=20,019 loops=1)

  • Buckets: 32,768 Batches: 1 Memory Usage: 1,351kB
  • Buffers: shared hit=844
8. 8.355 8.355 ↑ 1.0 20,019 1

Seq Scan on article a (cost=0.00..1,044.33 rows=20,033 width=19) (actual time=0.018..8.355 rows=20,019 loops=1)

  • Buffers: shared hit=844
9. 0.305 0.867 ↑ 1.0 1,479 1

Hash (cost=64.79..64.79 rows=1,479 width=19) (actual time=0.867..0.867 rows=1,479 loops=1)

  • Buckets: 2,048 Batches: 1 Memory Usage: 97kB
  • Buffers: shared hit=50
10. 0.562 0.562 ↑ 1.0 1,479 1

Seq Scan on magasin m (cost=0.00..64.79 rows=1,479 width=19) (actual time=0.026..0.562 rows=1,479 loops=1)

  • Buffers: shared hit=50
11. 4,758.030 4,758.030 ↓ 0.0 0 793,005

Index Scan using vente_uk on vente v (cost=0.57..8.59 rows=1 width=34) (actual time=0.006..0.006 rows=0 loops=793,005)

  • Index Cond: ((magasin_id = m.id) AND (date = dvj.journee) AND (article_id = a.id))
  • Buffers: shared hit=3,903,740 read=73 dirtied=18
12. 1,219.725 1,219.725 ↑ 1.0 1 243,945

Index Scan using vente_pkey on vente (cost=0.57..8.19 rows=1 width=181) (actual time=0.005..0.005 rows=1 loops=243,945)

  • Index Cond: (id = v.id)
  • Buffers: shared hit=1,402,687
Planning time : 2.981 ms
Execution time : 15,597.101 ms