explain.depesz.com

PostgreSQL's explain analyze made readable

Result: YQBp

Settings
# exclusive inclusive rows x rows loops node
1. 4.414 99.890 ↑ 13.5 319 1

HashAggregate (cost=18,025.82..18,111.92 rows=4,305 width=48) (actual time=99.837..99.890 rows=319 loops=1)

  • Group Key: (((s.annee)::text || ' - '::text) || a.libelle)
2.          

Initplan (forHashAggregate)

3. 0.004 0.004 ↑ 1.0 1 1

Result (cost=0.00..0.02 rows=1 width=8) (actual time=0.004..0.004 rows=1 loops=1)

4. 5.418 95.472 ↓ 3.9 16,873 1

Hash Left Join (cost=180.71..17,971.98 rows=4,305 width=40) (actual time=32.525..95.472 rows=16,873 loops=1)

  • Hash Cond: (v.appellation_id = a.id)
5. 2.432 89.977 ↓ 3.9 16,873 1

Hash Join (cost=170.53..17,859.56 rows=4,305 width=16) (actual time=32.435..89.977 rows=16,873 loops=1)

  • Hash Cond: (s.contenant_id = c.id)
6. 3.075 87.532 ↓ 3.9 16,873 1

Hash Join (cost=169.46..17,799.30 rows=4,305 width=16) (actual time=32.412..87.532 rows=16,873 loops=1)

  • Hash Cond: (s.vin_id = v.id)
7. 83.107 83.107 ↓ 3.9 16,873 1

Seq Scan on stock s (cost=0.00..17,570.64 rows=4,305 width=16) (actual time=31.029..83.107 rows=16,873 loops=1)

  • Filter: ($0 = (annee)::double precision)
  • Rows Removed by Filter: 844170
8. 0.684 1.350 ↑ 1.0 6,065 1

Hash (cost=93.65..93.65 rows=6,065 width=8) (actual time=1.350..1.350 rows=6,065 loops=1)

  • Buckets: 8192 Batches: 1 Memory Usage: 301kB
9. 0.666 0.666 ↑ 1.0 6,065 1

Seq Scan on vin v (cost=0.00..93.65 rows=6,065 width=8) (actual time=0.007..0.666 rows=6,065 loops=1)

10. 0.006 0.013 ↑ 1.0 3 1

Hash (cost=1.03..1.03 rows=3 width=8) (actual time=0.013..0.013 rows=3 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
11. 0.007 0.007 ↑ 1.0 3 1

Seq Scan on contenant c (cost=0.00..1.03 rows=3 width=8) (actual time=0.006..0.007 rows=3 loops=1)

12. 0.039 0.077 ↑ 1.0 319 1

Hash (cost=6.19..6.19 rows=319 width=20) (actual time=0.077..0.077 rows=319 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 25kB
13. 0.038 0.038 ↑ 1.0 319 1

Seq Scan on appellation a (cost=0.00..6.19 rows=319 width=20) (actual time=0.007..0.038 rows=319 loops=1)