explain.depesz.com

PostgreSQL's explain analyze made readable

Result: MkhJ

Settings
# exclusive inclusive rows x rows loops node
1. 4.153 45.042 ↑ 51.0 319 1

HashAggregate (cost=1,357.27..1,682.65 rows=16,269 width=48) (actual time=44.885..45.042 rows=319 loops=1)

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

Initplan (forHashAggregate)

3. 0.010 0.010 ↑ 1.0 1 1

Result (cost=0.00..0.02 rows=1 width=4) (actual time=0.010..0.010 rows=1 loops=1)

4. 5.312 40.879 ↓ 1.0 16,904 1

Hash Join (cost=185.22..1,146.08 rows=16,893 width=40) (actual time=23.995..40.879 rows=16,904 loops=1)

  • Hash Cond: (v.appellation_id = a.id)
5. 3.535 35.438 ↓ 1.0 16,904 1

Hash Join (cost=175.05..922.04 rows=16,893 width=16) (actual time=23.830..35.438 rows=16,904 loops=1)

  • Hash Cond: (s.vin_id = v.id)
6. 3.602 30.231 ↓ 1.0 16,904 1

Hash Join (cost=1.49..704.11 rows=16,893 width=16) (actual time=22.118..30.231 rows=16,904 loops=1)

  • Hash Cond: (s.contenant_id = c.id)
7. 26.615 26.615 ↓ 1.0 16,904 1

Index Scan using stock_annee on stock s (cost=0.42..596.05 rows=16,893 width=16) (actual time=22.083..26.615 rows=16,904 loops=1)

  • Index Cond: (annee = $0)
8. 0.005 0.014 ↑ 1.0 3 1

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

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

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

10. 0.813 1.672 ↑ 1.0 6,069 1

Hash (cost=97.69..97.69 rows=6,069 width=8) (actual time=1.672..1.672 rows=6,069 loops=1)

  • Buckets: 8192 Batches: 1 Memory Usage: 302kB
11. 0.859 0.859 ↑ 1.0 6,069 1

Seq Scan on vin v (cost=0.00..97.69 rows=6,069 width=8) (actual time=0.009..0.859 rows=6,069 loops=1)

12. 0.070 0.129 ↑ 1.0 319 1

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

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

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