explain.depesz.com

PostgreSQL's explain analyze made readable

Result: pta3

Settings
# exclusive inclusive rows x rows loops node
1. 6.585 27.725 ↑ 51.0 319 1

HashAggregate (cost=1,820.65..2,146.03 rows=16,269 width=48) (actual time=27.682..27.725 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. 7.908 21.136 ↑ 1.0 16,875 1

Hash Join (cost=398.02..1,609.59 rows=16,883 width=40) (actual time=4.525..21.136 rows=16,875 loops=1)

  • Hash Cond: (s.contenant_id = c.id)
5. 5.247 13.218 ↑ 1.0 16,875 1

Hash Join (cost=385.81..1,196.40 rows=16,883 width=28) (actual time=4.509..13.218 rows=16,875 loops=1)

  • Hash Cond: (s.vin_id = v.id)
6. 3.497 3.497 ↑ 1.0 16,875 1

Index Scan using ind_stock_annee on stock s (cost=0.43..578.88 rows=16,883 width=16) (actual time=0.028..3.497 rows=16,875 loops=1)

  • Index Cond: (($0)::integer = annee)
7. 1.144 4.474 ↑ 1.0 6,065 1

Hash (cost=309.57..309.57 rows=6,065 width=20) (actual time=4.474..4.474 rows=6,065 loops=1)

  • Buckets: 8192 Batches: 1 Memory Usage: 377kB
8. 2.002 3.330 ↑ 1.0 6,065 1

Hash Left Join (cost=23.20..309.57 rows=6,065 width=20) (actual time=0.155..3.330 rows=6,065 loops=1)

  • Hash Cond: (v.appellation_id = a.id)
9. 1.182 1.182 ↑ 1.0 6,065 1

Index Scan using vin_pkey on vin v (cost=0.28..203.26 rows=6,065 width=8) (actual time=0.005..1.182 rows=6,065 loops=1)

10. 0.062 0.146 ↑ 1.0 319 1

Hash (cost=18.93..18.93 rows=319 width=20) (actual time=0.146..0.146 rows=319 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 25kB
11. 0.084 0.084 ↑ 1.0 319 1

Index Scan using appellation_pkey on appellation a (cost=0.15..18.93 rows=319 width=20) (actual time=0.005..0.084 rows=319 loops=1)

12. 0.002 0.010 ↑ 1.0 3 1

Hash (cost=12.18..12.18 rows=3 width=8) (actual time=0.010..0.010 rows=3 loops=1)

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

Index Scan using contenant_pkey on contenant c (cost=0.13..12.18 rows=3 width=8) (actual time=0.005..0.008 rows=3 loops=1)