explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 351a

Settings
# exclusive inclusive rows x rows loops node
1. 4.313 168.021 ↑ 1.0 319 1

HashAggregate (cost=18,812.70..18,819.08 rows=319 width=48) (actual time=167.968..168.021 rows=319 loops=1)

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

Hash Left Join (cost=184.55..18,758.96 rows=4,299 width=40) (actual time=105.963..163.708 rows=16,881 loops=1)

  • Hash Cond: (v.appellation_id = a.id)
3. 2.900 150.404 ↓ 3.9 16,881 1

Hash Join (cost=174.37..18,694.36 rows=4,299 width=20) (actual time=105.862..150.404 rows=16,881 loops=1)

  • Hash Cond: (s.contenant_id = c.id)
4. 3.439 147.490 ↓ 3.9 16,881 1

Hash Join (cost=173.30..18,666.07 rows=4,299 width=20) (actual time=105.835..147.490 rows=16,881 loops=1)

  • Hash Cond: (s.vin_id = v.id)
5. 82.713 142.689 ↓ 3.9 16,881 1

Hash Join (cost=0.04..18,481.51 rows=4,299 width=20) (actual time=104.458..142.689 rows=16,881 loops=1)

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

Seq Scan on stock s (cost=0.00..14,139.32 rows=859,832 width=16) (actual time=0.008..59.972 rows=859,832 loops=1)

7. 0.001 0.004 ↑ 1.0 1 1

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

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

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

9. 0.691 1.362 ↑ 1.0 6,056 1

Hash (cost=97.56..97.56 rows=6,056 width=8) (actual time=1.361..1.362 rows=6,056 loops=1)

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

Seq Scan on vin v (cost=0.00..97.56 rows=6,056 width=8) (actual time=0.009..0.671 rows=6,056 loops=1)

11. 0.003 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.011 0.011 ↑ 1.0 3 1

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

13. 0.047 0.088 ↑ 1.0 319 1

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

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

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

Planning time : 113.784 ms
Execution time : 168.106 ms