explain.depesz.com

PostgreSQL's explain analyze made readable

Result: taD7

Settings
# exclusive inclusive rows x rows loops node
1. 9,934.807 14,130.964 ↓ 0.0 0 1

Update on vente (cost=65,452.36..85,530.62 rows=1,279 width=213) (actual time=14,130.964..14,130.964 rows=0 loops=1)

  • Buffers: shared hit=6,643,395 read=29,784 dirtied=30,619 written=6,498
2. 265.982 4,196.157 ↓ 185.2 236,915 1

Nested Loop (cost=65,452.36..85,530.62 rows=1,279 width=213) (actual time=680.578..4,196.157 rows=236,915 loops=1)

  • Buffers: shared hit=1,198,030 read=13,181 dirtied=7,779
3. 236.251 2,508.685 ↓ 185.2 236,915 1

Hash Join (cost=65,451.79..74,840.58 rows=1,279 width=40) (actual time=678.705..2,508.685 rows=236,915 loops=1)

  • Hash Cond: (((a.code)::text = (dvj.code_article)::text) AND ((m.code)::text = (dvj.code_magasin)::text))
  • Buffers: shared hit=14,760 read=11,876 dirtied=7,779
4. 111.655 2,115.696 ↓ 1.5 237,672 1

Hash Join (cost=1,378.59..9,957.51 rows=154,261 width=40) (actual time=16.913..2,115.696 rows=237,672 loops=1)

  • Hash Cond: (v.magasin_id = m.id)
  • Buffers: shared hit=12,732 read=11,224 dirtied=7,779
5. 182.164 2,003.279 ↓ 1.5 237,672 1

Hash Join (cost=1,295.31..9,468.15 rows=154,261 width=37) (actual time=16.140..2,003.279 rows=237,672 loops=1)

  • Hash Cond: (v.article_id = a.id)
  • Buffers: shared hit=12,682 read=11,224 dirtied=7,779
6. 1,808.815 1,808.815 ↓ 1.5 237,672 1

Index Scan using vente_date_idx on vente v (cost=0.57..7,768.38 rows=154,261 width=34) (actual time=3.765..1,808.815 rows=237,672 loops=1)

  • Index Cond: (date = '2020-07-24'::date)
  • Buffers: shared hit=11,838 read=11,224 dirtied=7,779
7. 3.980 12.300 ↑ 1.0 20,019 1

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

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

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

  • Buffers: shared hit=844
9. 0.269 0.762 ↑ 1.0 1,479 1

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

  • Buckets: 2,048 Batches: 1 Memory Usage: 97kB
  • Buffers: shared hit=50
10. 0.493 0.493 ↑ 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.493 rows=1,479 loops=1)

  • Buffers: shared hit=50
11. 74.101 156.738 ↑ 1.0 237,601 1

Hash (cost=60,389.47..60,389.47 rows=245,582 width=28) (actual time=156.738..156.738 rows=237,601 loops=1)

  • Buckets: 262,144 Batches: 1 Memory Usage: 16,587kB
  • Buffers: shared hit=2,028 read=652
12. 58.717 82.637 ↑ 1.0 237,601 1

Bitmap Heap Scan on derniere_vente_journee dvj (cost=4,603.69..60,389.47 rows=245,582 width=28) (actual time=24.216..82.637 rows=237,601 loops=1)

  • Recheck Cond: (journee = '2020-07-24'::date)
  • Heap Blocks: exact=2,027
  • Buffers: shared hit=2,028 read=652
13. 23.920 23.920 ↑ 1.0 237,601 1

Bitmap Index Scan on derniere_vente_journee_journee_idx (cost=0.00..4,542.30 rows=245,582 width=0) (actual time=23.920..23.920 rows=237,601 loops=1)

  • Index Cond: (journee = '2020-07-24'::date)
  • Buffers: shared hit=1 read=652
14. 1,421.490 1,421.490 ↑ 1.0 1 236,915

Index Scan using vente_pkey on vente (cost=0.57..8.36 rows=1 width=181) (actual time=0.006..0.006 rows=1 loops=236,915)

  • Index Cond: (id = v.id)
  • Buffers: shared hit=1,183,270 read=1,305
Planning time : 2.269 ms
Execution time : 14,131.307 ms