explain.depesz.com

PostgreSQL's explain analyze made readable

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

Settings

Optimization path:

Optimization(s) for this plan:

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

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

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

Initplan (forFinalize GroupAggregate)

3. 0.004 0.004 ↑ 1.0 1 1

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

4. 0.000 111.059 ↑ 3.7 957 1

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

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

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

  • Group Key: ((((s.annee)::text || ' - '::text) || a.libelle))
6. 40.974 283.260 ↓ 3.1 5,619 3

Sort (cost=10,346.87..10,351.36 rows=1,793 width=40) (actual time=93.955..94.420 rows=5,619 loops=3)

  • Sort Key: ((((s.annee)::text || ' - '::text) || a.libelle))
  • Sort Method: quicksort Memory: 719kB
  • Worker 0: Sort Method: quicksort Memory: 532kB
  • Worker 1: Sort Method: quicksort Memory: 667kB
7. 15.624 242.286 ↓ 3.1 5,619 3

Hash Left Join (cost=180.64..10,249.98 rows=1,793 width=40) (actual time=27.057..80.762 rows=5,619 loops=3)

  • Hash Cond: (v.appellation_id = a.id)
8. 9.618 225.654 ↓ 3.1 5,619 3

Hash Join (cost=170.46..10,217.10 rows=1,793 width=16) (actual time=26.690..75.218 rows=5,619 loops=3)

  • Hash Cond: (s.vin_id = v.id)
9. 8.505 193.137 ↓ 3.1 5,619 3

Hash Join (cost=1.07..10,043.00 rows=1,793 width=16) (actual time=18.950..64.379 rows=5,619 loops=3)

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

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

  • Filter: ((annee)::double precision = $0)
  • Rows Removed by Filter: 281238
11. 0.042 0.195 ↑ 1.0 3 3

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

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

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

13. 12.318 22.899 ↑ 1.0 6,062 3

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

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

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

15. 0.531 1.008 ↑ 1.0 319 3

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

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

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