explain.depesz.com

PostgreSQL's explain analyze made readable

Result: mTP9

Settings
# exclusive inclusive rows x rows loops node
1. 0.176 262.395 ↑ 13.5 319 1

Finalize GroupAggregate (cost=54,002.60..54,591.90 rows=4,301 width=48) (actual time=258.993..262.395 rows=319 loops=1)

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

Initplan (forFinalize GroupAggregate)

3. 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)

4. 0.000 262.216 ↑ 3.7 957 1

Gather Merge (cost=54,002.58..54,478.98 rows=3,584 width=48) (actual time=258.971..262.216 rows=957 loops=1)

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

Partial GroupAggregate (cost=53,002.56..53,065.28 rows=1,792 width=48) (actual time=253.039..255.038 rows=319 loops=3)

  • Group Key: ((((s.annee)::text || ' - '::text) || a.libelle))
6. 61.953 760.383 ↓ 3.1 5,607 3

Sort (cost=53,002.56..53,007.04 rows=1,792 width=40) (actual time=253.010..253.461 rows=5,607 loops=3)

  • Sort Key: ((((s.annee)::text || ' - '::text) || a.libelle))
  • Sort Method: quicksort Memory: 579kB
  • Worker 0: Sort Method: quicksort Memory: 533kB
  • Worker 1: Sort Method: quicksort Memory: 803kB
7. 12.798 698.430 ↓ 3.1 5,607 3

Hash Left Join (cost=110.78..52,905.72 rows=1,792 width=40) (actual time=0.336..232.810 rows=5,607 loops=3)

  • Hash Cond: (v.appellation_id = a.id)
8. 7.308 685.071 ↓ 3.1 5,607 3

Hash Join (cost=81.86..52,854.11 rows=1,792 width=16) (actual time=0.133..228.357 rows=5,607 loops=3)

  • Hash Cond: (s.contenant_id = c.id)
9. 10.440 677.712 ↓ 3.1 5,607 3

Merge Join (cost=0.71..52,768.25 rows=1,792 width=16) (actual time=0.074..225.904 rows=5,607 loops=3)

  • Merge Cond: (s.vin_id = v.id)
10. 661.197 661.197 ↓ 3.1 5,607 3

Parallel Index Scan using stock_pkey on stock s (cost=0.42..52,393.78 rows=1,792 width=16) (actual time=0.041..220.399 rows=5,607 loops=3)

  • Filter: ((annee)::double precision = $0)
  • Rows Removed by Filter: 281130
11. 6.075 6.075 ↑ 1.1 6,058 3

Index Scan using vin_pkey on vin v (cost=0.28..334.96 rows=6,845 width=8) (actual time=0.020..2.025 rows=6,058 loops=3)

12. 0.015 0.051 ↑ 400.0 3 3

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

  • Buckets: 2048 Batches: 1 Memory Usage: 17kB
13. 0.036 0.036 ↑ 400.0 3 3

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

14. 0.225 0.561 ↑ 1.0 319 3

Hash (cost=24.93..24.93 rows=319 width=36) (actual time=0.187..0.187 rows=319 loops=3)

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

Index Scan using appellation_pkey on appellation a (cost=0.15..24.93 rows=319 width=36) (actual time=0.021..0.112 rows=319 loops=3)