explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 6ThT

Settings

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 4.943 258.039 ↑ 1.0 319 1

HashAggregate (cost=17,915.38..17,921.76 rows=319 width=48) (actual time=257.981..258.039 rows=319 loops=1)

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

Hash Left Join (cost=180.68..17,861.59 rows=4,303 width=40) (actual time=201.975..253.096 rows=16,831 loops=1)

  • Hash Cond: (v.appellation_id = a.id)
3. 4.099 237.955 ↓ 3.9 16,831 1

Hash Join (cost=170.50..17,796.95 rows=4,303 width=20) (actual time=201.839..237.955 rows=16,831 loops=1)

  • Hash Cond: (s.vin_id = v.id)
4. 3.938 230.888 ↓ 3.9 16,831 1

Hash Join (cost=1.11..17,616.25 rows=4,303 width=20) (actual time=198.827..230.888 rows=16,831 loops=1)

  • Hash Cond: (s.contenant_id = c.id)
5. 122.731 226.938 ↓ 3.9 16,831 1

Hash Join (cost=0.04..17,603.64 rows=4,303 width=20) (actual time=198.790..226.938 rows=16,831 loops=1)

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

Seq Scan on stock s (cost=0.00..13,257.71 rows=860,571 width=16) (actual time=0.625..104.184 rows=860,571 loops=1)

7. 0.015 0.023 ↑ 1.0 1 1

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

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

9. 0.005 0.012 ↑ 1.0 3 1

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

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

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

11. 1.006 2.968 ↑ 1.0 6,062 1

Hash (cost=93.62..93.62 rows=6,062 width=8) (actual time=2.968..2.968 rows=6,062 loops=1)

  • Buckets: 8192 Batches: 1 Memory Usage: 301kB
12. 1.962 1.962 ↑ 1.0 6,062 1

Seq Scan on vin v (cost=0.00..93.62 rows=6,062 width=8) (actual time=0.373..1.962 rows=6,062 loops=1)

13. 0.065 0.110 ↑ 1.0 319 1

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

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

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