explain.depesz.com

PostgreSQL's explain analyze made readable

Result: CxWb

Settings
# exclusive inclusive rows x rows loops node
1. 4.404 138.746 ↑ 1.0 319 1

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

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

Hash Left Join (cost=180.75..18,015.08 rows=4,305 width=40) (actual time=8.812..134.342 rows=16,875 loops=1)

  • Hash Cond: (v.appellation_id = a.id)
3. 2.518 123.915 ↓ 3.9 16,875 1

Hash Join (cost=170.57..17,902.65 rows=4,305 width=20) (actual time=8.732..123.915 rows=16,875 loops=1)

  • Hash Cond: (s.contenant_id = c.id)
4. 2.970 121.387 ↓ 3.9 16,875 1

Hash Join (cost=169.50..17,842.39 rows=4,305 width=20) (actual time=8.714..121.387 rows=16,875 loops=1)

  • Hash Cond: (s.vin_id = v.id)
5. 70.628 117.278 ↓ 3.9 16,875 1

Hash Join (cost=0.04..17,613.74 rows=4,305 width=20) (actual time=7.554..117.278 rows=16,875 loops=1)

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

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

7. 0.002 0.006 ↑ 1.0 1 1

Hash (cost=0.03..0.03 rows=1 width=8) (actual time=0.006..0.006 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.588 1.139 ↑ 1.0 6,065 1

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

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

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

11. 0.005 0.010 ↑ 1.0 3 1

Hash (cost=1.03..1.03 rows=3 width=8) (actual time=0.010..0.010 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.036 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.032 0.032 ↑ 1.0 319 1

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