explain.depesz.com

PostgreSQL's explain analyze made readable

Result: R30 : Optimization for: Optimization for: plan #3hmn; plan #4i4

Settings

Optimization path:

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 0.000 96.554 ↑ 13.5 319 1

Finalize GroupAggregate (cost=11,346.92..11,936.54 rows=4,303 width=48) (actual time=93.664..96.554 rows=319 loops=1)

  • Group Key: ((((s.annee)::text || ' - '::text) || a.libelle))
2.          

Initplan (forFinalize GroupAggregate)

3. 0.008 0.008 ↑ 1.0 1 1

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

4. 0.000 98.313 ↑ 3.7 957 1

Gather Merge (cost=11,346.90..11,823.57 rows=3,586 width=48) (actual time=93.643..98.313 rows=957 loops=1)

  • Workers Planned: 2
  • Params Evaluated: $0
  • Workers Launched: 2
5. 4.437 242.889 ↑ 5.6 319 3

Partial GroupAggregate (cost=10,346.87..10,409.63 rows=1,793 width=48) (actual time=79.073..80.963 rows=319 loops=3)

  • Group Key: ((((s.annee)::text || ' - '::text) || a.libelle))
6. 38.040 238.452 ↓ 3.1 5,614 3

Sort (cost=10,346.87..10,351.36 rows=1,793 width=40) (actual time=79.057..79.484 rows=5,614 loops=3)

  • Sort Key: ((((s.annee)::text || ' - '::text) || a.libelle))
  • Sort Method: quicksort Memory: 529kB
  • Worker 0: Sort Method: quicksort Memory: 524kB
  • Worker 1: Sort Method: quicksort Memory: 1056kB
7. 9.396 200.412 ↓ 3.1 5,614 3

Hash Join (cost=180.64..10,249.98 rows=1,793 width=40) (actual time=29.363..66.804 rows=5,614 loops=3)

  • Hash Cond: (v.appellation_id = a.id)
8. 5.622 188.064 ↓ 3.1 5,614 3

Hash Join (cost=170.46..10,217.10 rows=1,793 width=16) (actual time=28.151..62.688 rows=5,614 loops=3)

  • Hash Cond: (s.vin_id = v.id)
9. 5.496 173.934 ↓ 3.1 5,614 3

Hash Join (cost=1.07..10,043.00 rows=1,793 width=16) (actual time=25.276..57.978 rows=5,614 loops=3)

  • Hash Cond: (s.contenant_id = c.id)
10. 168.372 168.372 ↓ 3.1 5,614 3

Parallel Seq Scan on stock s (cost=0.00..10,030.57 rows=1,793 width=16) (actual time=25.233..56.124 rows=5,614 loops=3)

  • Filter: ((annee)::double precision = $0)
  • Rows Removed by Filter: 281243
11. 0.015 0.066 ↑ 1.0 3 3

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

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
12. 0.051 0.051 ↑ 1.0 3 3

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

13. 4.476 8.508 ↑ 1.0 6,062 3

Hash (cost=93.62..93.62 rows=6,062 width=8) (actual time=2.835..2.836 rows=6,062 loops=3)

  • Buckets: 8192 Batches: 1 Memory Usage: 301kB
14. 4.032 4.032 ↑ 1.0 6,062 3

Seq Scan on vin v (cost=0.00..93.62 rows=6,062 width=8) (actual time=0.015..1.344 rows=6,062 loops=3)

15. 1.569 2.952 ↑ 1.0 319 3

Hash (cost=6.19..6.19 rows=319 width=20) (actual time=0.984..0.984 rows=319 loops=3)

  • Buckets: 1024 Batches: 1 Memory Usage: 25kB
16. 1.383 1.383 ↑ 1.0 319 3

Seq Scan on appellation a (cost=0.00..6.19 rows=319 width=20) (actual time=0.107..0.461 rows=319 loops=3)