explain.depesz.com

PostgreSQL's explain analyze made readable

Result: NqhF

Settings
# exclusive inclusive rows x rows loops node
1. 4.690 229.072 ↑ 1.0 319 1

HashAggregate (cost=18,824.56..18,830.94 rows=319 width=48) (actual time=229.018..229.072 rows=319 loops=1)

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

Hash Left Join (cost=184.68..18,770.77 rows=4,303 width=40) (actual time=95.746..224.382 rows=16,792 loops=1)

  • Hash Cond: (v.appellation_id = a.id)
3. 2.997 210.706 ↓ 3.9 16,792 1

Hash Join (cost=174.50..18,706.12 rows=4,303 width=20) (actual time=95.604..210.706 rows=16,792 loops=1)

  • Hash Cond: (s.contenant_id = c.id)
4. 3.582 207.695 ↓ 3.9 16,792 1

Hash Join (cost=173.44..18,677.80 rows=4,303 width=20) (actual time=95.562..207.695 rows=16,792 loops=1)

  • Hash Cond: (s.vin_id = v.id)
5. 83.429 202.517 ↓ 3.9 16,792 1

Hash Join (cost=0.04..18,493.10 rows=4,303 width=20) (actual time=93.913..202.517 rows=16,792 loops=1)

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

Seq Scan on stock s (cost=0.00..14,147.02 rows=860,602 width=16) (actual time=0.007..119.069 rows=860,602 loops=1)

7. 0.007 0.019 ↑ 1.0 1 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
8. 0.012 0.012 ↑ 1.0 1 1

Result (cost=0.00..0.02 rows=1 width=8) (actual time=0.011..0.012 rows=1 loops=1)

9. 0.800 1.596 ↑ 1.0 6,062 1

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

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

Seq Scan on vin v (cost=0.00..97.62 rows=6,062 width=8) (actual time=0.015..0.796 rows=6,062 loops=1)

11. 0.006 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
12. 0.008 0.008 ↑ 1.0 3 1

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

13. 0.057 0.105 ↑ 1.0 319 1

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

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

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