explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 6Opo

Settings
# exclusive inclusive rows x rows loops node
1. 4.343 121.192 ↑ 13.5 319 1

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

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

Initplan (forHashAggregate)

3. 0.008 0.008 ↑ 1.0 1 1

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

4. 4.951 116.841 ↓ 3.9 16,891 1

Hash Left Join (cost=180.71..17,971.98 rows=4,305 width=40) (actual time=73.073..116.841 rows=16,891 loops=1)

  • Hash Cond: (v.appellation_id = a.id)
5. 2.399 111.821 ↓ 3.9 16,891 1

Hash Join (cost=170.53..17,859.56 rows=4,305 width=16) (actual time=72.995..111.821 rows=16,891 loops=1)

  • Hash Cond: (s.contenant_id = c.id)
6. 3.024 109.399 ↓ 3.9 16,891 1

Hash Join (cost=169.46..17,799.30 rows=4,305 width=16) (actual time=72.952..109.399 rows=16,891 loops=1)

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

Seq Scan on stock s (cost=0.00..17,570.64 rows=4,305 width=16) (actual time=71.799..105.256 rows=16,891 loops=1)

  • Filter: ($0 = (annee)::double precision)
  • Rows Removed by Filter: 844152
8. 0.591 1.119 ↑ 1.0 6,065 1

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

  • Buckets: 8192 Batches: 1 Memory Usage: 301kB
9. 0.528 0.528 ↑ 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.528 rows=6,065 loops=1)

10. 0.009 0.023 ↑ 1.0 3 1

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

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

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

12. 0.039 0.069 ↑ 1.0 319 1

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

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

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