explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Yj5k

Settings
# exclusive inclusive rows x rows loops node
1. 4.430 145.060 ↑ 1.0 319 1

HashAggregate (cost=18,068.89..18,075.27 rows=319 width=48) (actual time=145.021..145.060 rows=319 loops=1)

  • Group Key: (((((round((random() * '50'::double precision)) + '1950'::double precision)))::text || ' - '::text) || a.libelle)
2. 10.274 140.630 ↓ 3.9 16,794 1

Hash Left Join (cost=180.75..18,015.08 rows=4,305 width=40) (actual time=45.008..140.630 rows=16,794 loops=1)

  • Hash Cond: (v.appellation_id = a.id)
3. 2.532 130.288 ↓ 3.9 16,794 1

Hash Join (cost=170.57..17,902.65 rows=4,305 width=20) (actual time=44.925..130.288 rows=16,794 loops=1)

  • Hash Cond: (s.contenant_id = c.id)
4. 3.072 127.748 ↓ 3.9 16,794 1

Hash Join (cost=169.50..17,842.39 rows=4,305 width=20) (actual time=44.908..127.748 rows=16,794 loops=1)

  • Hash Cond: (s.vin_id = v.id)
5. 74.157 123.563 ↓ 3.9 16,794 1

Hash Join (cost=0.04..17,613.74 rows=4,305 width=20) (actual time=43.769..123.563 rows=16,794 loops=1)

  • Hash Cond: ((s.annee)::double precision = ((round((random() * '50'::double precision)) + '1950'::double precision)))
6. 49.401 49.401 ↑ 1.0 861,043 1

Seq Scan on stock s (cost=0.00..13,265.43 rows=861,043 width=16) (actual time=0.008..49.401 rows=861,043 loops=1)

7. 0.001 0.005 ↑ 1.0 1 1

Hash (cost=0.03..0.03 rows=1 width=8) (actual time=0.005..0.005 rows=1 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
8. 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)

9. 0.592 1.113 ↑ 1.0 6,065 1

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

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

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

11. 0.003 0.008 ↑ 1.0 3 1

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

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

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

13. 0.042 0.068 ↑ 1.0 319 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 25kB
14. 0.026 0.026 ↑ 1.0 319 1

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