explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Fmof

Settings
# exclusive inclusive rows x rows loops node
1. 13.572 1,629.481 ↓ 0.0 0 1

Update on vente (cost=1,379.16..2,060,604.59 rows=1,389 width=213) (actual time=1,629.481..1,629.481 rows=0 loops=1)

  • Buffers: shared hit=899,443 read=3 dirtied=10 written=7
2. 0.397 1,615.909 ↑ 4.9 283 1

Nested Loop (cost=1,379.16..2,060,604.59 rows=1,389 width=213) (actual time=537.419..1,615.909 rows=283 loops=1)

  • Buffers: shared hit=893,114
3. 121.792 1,614.097 ↑ 4.9 283 1

Nested Loop (cost=1,378.59..2,049,225.57 rows=1,389 width=40) (actual time=537.399..1,614.097 rows=283 loops=1)

  • Buffers: shared hit=891,699
4. 77.657 864.360 ↑ 1.1 209,315 1

Hash Join (cost=1,378.02..148,442.98 rows=220,957 width=46) (actual time=536.192..864.360 rows=209,315 loops=1)

  • Hash Cond: ((dvj.code_magasin)::text = (m.code)::text)
  • Buffers: shared hit=53,610
5. 95.756 785.952 ↑ 1.1 209,315 1

Hash Join (cost=1,294.74..147,778.03 rows=220,957 width=37) (actual time=535.429..785.952 rows=209,315 loops=1)

  • Hash Cond: ((dvj.code_article)::text = (a.code)::text)
  • Buffers: shared hit=53,560
6. 679.790 679.790 ↑ 1.1 209,315 1

Seq Scan on derniere_vente_journee dvj (cost=0.00..145,903.15 rows=220,957 width=28) (actual time=524.960..679.790 rows=209,315 loops=1)

  • Filter: ((journee >= '2020-07-28'::date) AND (journee <= '2020-07-28'::date))
  • Rows Removed by Filter: 6,002,710
  • Buffers: shared hit=52,716
7. 4.358 10.406 ↑ 1.0 20,019 1

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

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

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

  • Buffers: shared hit=844
9. 0.302 0.751 ↑ 1.0 1,479 1

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

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

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

  • Buffers: shared hit=50
11. 627.945 627.945 ↓ 0.0 0 209,315

Index Scan using vente_uk on vente v (cost=0.57..8.59 rows=1 width=34) (actual time=0.003..0.003 rows=0 loops=209,315)

  • Index Cond: ((magasin_id = m.id) AND (date = dvj.journee) AND (article_id = a.id))
  • Buffers: shared hit=838,089
12. 1.415 1.415 ↑ 1.0 1 283

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=283)

  • Index Cond: (id = v.id)
  • Buffers: shared hit=1,415
Planning time : 2.562 ms
Execution time : 1,629.629 ms