explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 6FSL : TEST

Settings
# exclusive inclusive rows x rows loops node
1. 0.054 2,361.154 ↑ 6,289.0 2 1

Sort (cost=89,234.22..89,265.66 rows=12,578 width=56) (actual time=2,361.153..2,361.154 rows=2 loops=1)

  • Sort Key: s.stg_nom
  • Sort Method: quicksort Memory: 25kB
  • Buffers: shared hit=2658 read=96
2. 0.627 2,361.100 ↑ 6,289.0 2 1

HashAggregate (cost=88,251.96..88,377.74 rows=12,578 width=56) (actual time=2,361.040..2,361.100 rows=2 loops=1)

  • Group Key: s.stg_nom, s.stg_id, s.description, s.stg_datecre
  • Buffers: shared hit=2655 read=96
3. 0.939 2,360.473 ↑ 123.1 539 1

Merge Left Join (cost=0.57..87,588.34 rows=66,362 width=56) (actual time=166.692..2,360.473 rows=539 loops=1)

  • Merge Cond: (s.stg_id = cpt.stg_id)
  • Buffers: shared hit=2655 read=96
4. 1,976.125 2,166.682 ↑ 62.7 270 1

Nested Loop (cost=0.29..85,090.02 rows=16,919 width=56) (actual time=18.873..2,166.682 rows=270 loops=1)

  • Join Filter: ((upper((s.stg_nom)::text) ~~ 'VINCI CONSTRUCTION'::text) OR ((a.stg_id = s.stg_id) AND (upper((a.nom_alias)::text) ~~ 'MALRANGE'::text)))
  • Rows Removed by Join Filter: 3384019
  • Buffers: shared hit=2447 read=34
5. 14.423 14.423 ↓ 1.0 12,581 1

Index Scan using stg_pkey on stg s (cost=0.29..497.60 rows=12,578 width=56) (actual time=0.039..14.423 rows=12,581 loops=1)

  • Filter: (NOT modele)
  • Rows Removed by Filter: 4
  • Buffers: shared hit=2446 read=33
6. 176.070 176.134 ↑ 1.0 269 12,581

Materialize (cost=0.00..6.03 rows=269 width=16) (actual time=0.000..0.014 rows=269 loops=12,581)

  • Buffers: shared hit=1 read=1
7. 0.064 0.064 ↑ 1.0 269 1

Seq Scan on stg_alias a (cost=0.00..4.69 rows=269 width=16) (actual time=0.013..0.064 rows=269 loops=1)

  • Buffers: shared hit=1 read=1
8. 0.893 192.852 ↑ 11.2 4,388 1

Materialize (cost=0.29..1,583.95 rows=49,352 width=4) (actual time=0.059..192.852 rows=4,388 loops=1)

  • Buffers: shared hit=208 read=62
9. 191.959 191.959 ↑ 12.8 3,852 1

Index Only Scan using wed_stg_cpt_fac_stg_id_idx on stg_cpt_fac cpt (cost=0.29..1,460.57 rows=49,352 width=4) (actual time=0.054..191.959 rows=3,852 loops=1)

  • Heap Fetches: 387
  • Buffers: shared hit=208 read=62
Planning time : 2,615.870 ms
Execution time : 2,361.500 ms