explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Nw3

Settings
# exclusive inclusive rows x rows loops node
1. 3.342 501.056 ↑ 1.0 319 1

GroupAggregate (cost=60,810.85..60,881.70 rows=319 width=48) (actual time=496.842..501.056 rows=319 loops=1)

  • Group Key: ((((((round((random() * '50'::double precision)) + '1950'::double precision)))::text || ' - '::text) || a.libelle))
  • Planning Time: 1.352 ms
  • Execution Time: 501.201 ms
2. 26.787 497.714 ↓ 3.9 16,790 1

Sort (cost=60,810.85..60,821.59 rows=4,298 width=40) (actual time=496.818..497.714 rows=16,790 loops=1)

  • Sort Key: ((((((round((random() * '50'::double precision)) + '1950'::double precision)))::text || ' - '::text) || a.libelle))
  • Sort Method: quicksort Memory: 2102kB
3. 16.752 470.927 ↓ 3.9 16,790 1

Hash Left Join (cost=525.06..60,551.48 rows=4,298 width=40) (actual time=4.308..470.927 rows=16,790 loops=1)

  • Hash Cond: (v.appellation_id = a.id)
4. 5.449 454.049 ↓ 3.9 16,790 1

Hash Join (cost=502.14..60,474.15 rows=4,298 width=20) (actual time=4.170..454.049 rows=16,790 loops=1)

  • Hash Cond: (s.vin_id = v.id)
5. 4.461 444.707 ↓ 3.9 16,790 1

Hash Join (cost=81.62..60,042.34 rows=4,298 width=20) (actual time=0.259..444.707 rows=16,790 loops=1)

  • Hash Cond: (s.contenant_id = c.id)
6. 105.424 440.229 ↓ 3.9 16,790 1

Hash Join (cost=0.47..59,949.86 rows=4,298 width=20) (actual time=0.228..440.229 rows=16,790 loops=1)

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

Index Scan using stock_pkey on stock s (cost=0.42..55,609.20 rows=859,527 width=16) (actual time=0.033..334.792 rows=859,527 loops=1)

8. 0.006 0.013 ↑ 1.0 1 1

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

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

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

10. 0.005 0.017 ↑ 400.0 3 1

Hash (cost=66.15..66.15 rows=1,200 width=8) (actual time=0.017..0.017 rows=3 loops=1)

  • Buckets: 2048 Batches: 1 Memory Usage: 17kB
11. 0.012 0.012 ↑ 400.0 3 1

Index Scan using contenant_pkey on contenant c (cost=0.15..66.15 rows=1,200 width=8) (actual time=0.007..0.012 rows=3 loops=1)

12. 1.582 3.893 ↑ 1.1 6,057 1

Hash (cost=334.96..334.96 rows=6,845 width=8) (actual time=3.893..3.893 rows=6,057 loops=1)

  • Buckets: 8192 Batches: 1 Memory Usage: 301kB
13. 2.311 2.311 ↑ 1.1 6,057 1

Index Scan using vin_pkey on vin v (cost=0.28..334.96 rows=6,845 width=8) (actual time=0.021..2.311 rows=6,057 loops=1)

14. 0.056 0.126 ↑ 1.0 319 1

Hash (cost=18.93..18.93 rows=319 width=20) (actual time=0.126..0.126 rows=319 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 25kB
15. 0.070 0.070 ↑ 1.0 319 1

Index Scan using appellation_pkey on appellation a (cost=0.15..18.93 rows=319 width=20) (actual time=0.006..0.070 rows=319 loops=1)