explain.depesz.com

PostgreSQL's explain analyze made readable

Result: rhY4

Settings
# exclusive inclusive rows x rows loops node
1. 28,348.010 107,337.646 ↓ 16.0 15,796,684 1

Hash Join (cost=3,341,124.14..5,072,605.83 rows=987,386 width=171) (actual time=64,259.046..107,337.646 rows=15,796,684 loops=1)

  • Output: pa_gen.pa_id, pa_gen.pa_gen, pa_gen.princ_compl, pa_gen.type_pri, pa_gen.type_prest, couv_lan.nom_couv, couv_lan.nom_pour_gest, pa_gen.pal_pa_id, pa_gen.pal_pa_gen, pa_gen.sub_pa_id, pa_
  • Hash Cond: ((pa_gen.pa_id = pa.pa_id) AND (pa_gen.pol_id = pa_gen_1.pol_id) AND (pa_gen.mupo_gen = pa_gen_1.mupo_gen) AND (pa_gen.pa_gen = (max(pa_gen_1.pa_gen))))
  • Buffers: shared hit=7080 read=1411501, temp read=560269 written=560009
2. 14,734.129 14,734.129 ↑ 1.0 15,796,684 1

Seq Scan on odyssee.pa_gen (cost=0.00..903,598.16 rows=15,798,168 width=122) (actual time=1.182..14,734.129 rows=15,796,684 loops=1)

  • Output: pa_gen.pa_id, pa_gen.pa_gen, pa_gen.princ_compl, pa_gen.type_pri, pa_gen.type_prest, pa_gen.pal_pa_id, pa_gen.pal_pa_gen, pa_gen.sub_pa_id, pa_gen.sub_pa_generation, pa_gen.rte_sub
  • Filter: ((pa_gen.etat)::text = ANY ('{VAL,ANNU}'::text[]))
  • Rows Removed by Filter: 24261
  • Buffers: shared hit=162 read=705735
3. 5,715.208 64,255.507 ↓ 39.9 15,820,945 1

Hash (cost=3,328,542.50..3,328,542.50 rows=396,632 width=69) (actual time=64,255.506..64,255.507 rows=15,820,945 loops=1)

  • Output: pa.pa_id, vco1.cou_id, couv_lan.nom_couv, couv_lan.nom_pour_gest, pa_gen_1.pol_id, pa_gen_1.mupo_gen, pa_gen_1.pa_id, (max(pa_gen_1.pa_gen))
  • Buckets: 262144 (originally 262144) Batches: 128 (originally 4) Memory Usage: 14555kB
  • Buffers: shared hit=6918 read=705766, temp read=118037 written=293616
4. 4,087.229 58,540.299 ↓ 39.9 15,820,945 1

Hash Join (cost=3,053,463.35..3,328,542.50 rows=396,632 width=69) (actual time=34,823.980..58,540.299 rows=15,820,945 loops=1)

  • Output: pa.pa_id, vco1.cou_id, couv_lan.nom_couv, couv_lan.nom_pour_gest, pa_gen_1.pol_id, pa_gen_1.mupo_gen, pa_gen_1.pa_id, (max(pa_gen_1.pa_gen))
  • Hash Cond: (pa.vco_id = vco1.vco_id)
  • Buffers: shared hit=6918 read=705766, temp read=118037 written=118031
5. 6,832.023 54,449.551 ↓ 39.9 15,820,945 1

Hash Join (cost=3,053,148.99..3,322,774.45 rows=396,632 width=24) (actual time=34,820.437..54,449.551 rows=15,820,945 loops=1)

  • Output: pa.pa_id, pa.vco_id, pa_gen_1.pol_id, pa_gen_1.mupo_gen, pa_gen_1.pa_id, (max(pa_gen_1.pa_gen))
  • Hash Cond: (pa_gen_1.pa_id = pa.pa_id)
  • Buffers: shared hit=6779 read=705766, temp read=118037 written=118031
6. 4,790.776 47,348.792 ↓ 10.0 15,820,945 1

GroupAggregate (cost=3,025,556.55..3,239,073.80 rows=1,581,609 width=16) (actual time=34,549.601..47,348.792 rows=15,820,945 loops=1)

  • Output: pa_gen_1.pol_id, pa_gen_1.mupo_gen, pa_gen_1.pa_id, max(pa_gen_1.pa_gen)
  • Group Key: pa_gen_1.pol_id, pa_gen_1.mupo_gen, pa_gen_1.pa_id
  • Buffers: shared hit=134 read=705766, temp read=63906 written=63906
7. 20,112.320 42,558.016 ↓ 1.0 15,820,945 1

Sort (cost=3,025,556.55..3,065,096.78 rows=15,816,093 width=16) (actual time=34,549.592..42,558.016 rows=15,820,945 loops=1)

  • Output: pa_gen_1.pol_id, pa_gen_1.mupo_gen, pa_gen_1.pa_id, pa_gen_1.pa_gen
  • Sort Key: pa_gen_1.pol_id, pa_gen_1.mupo_gen, pa_gen_1.pa_id
  • Sort Method: external merge Disk: 401832kB
  • Buffers: shared hit=134 read=705766, temp read=63906 written=63906
8. 22,445.696 22,445.696 ↓ 1.0 15,820,945 1

Seq Scan on odyssee.pa_gen pa_gen_1 (cost=0.00..864,057.93 rows=15,816,093 width=16) (actual time=0.007..22,445.696 rows=15,820,945 loops=1)

  • Output: pa_gen_1.pol_id, pa_gen_1.mupo_gen, pa_gen_1.pa_id, pa_gen_1.pa_gen
  • Buffers: shared hit=131 read=705766
9. 145.140 268.736 ↑ 1.0 793,264 1

Hash (cost=14,577.64..14,577.64 rows=793,264 width=8) (actual time=268.736..268.736 rows=793,264 loops=1)

  • Output: pa.pa_id, pa.vco_id
  • Buckets: 524288 Batches: 4 Memory Usage: 11834kB
  • Buffers: shared hit=6645, temp written=2033
10. 123.596 123.596 ↑ 1.0 793,264 1

Seq Scan on odyssee.pa (cost=0.00..14,577.64 rows=793,264 width=8) (actual time=0.009..123.596 rows=793,264 loops=1)

  • Output: pa.pa_id, pa.vco_id
  • Buffers: shared hit=6645
11. 0.749 3.519 ↑ 1.0 3,209 1

Hash (cost=274.25..274.25 rows=3,209 width=53) (actual time=3.519..3.519 rows=3,209 loops=1)

  • Output: vco1.cou_id, vco1.vco_id, couv_lan.nom_couv, couv_lan.nom_pour_gest
  • Buckets: 4096 Batches: 1 Memory Usage: 305kB
  • Buffers: shared hit=139
12. 1.285 2.770 ↑ 1.0 3,209 1

Hash Join (cost=102.00..274.25 rows=3,209 width=53) (actual time=1.013..2.770 rows=3,209 loops=1)

  • Output: vco1.cou_id, vco1.vco_id, couv_lan.nom_couv, couv_lan.nom_pour_gest
  • Hash Cond: (vco1.cou_id = couv_lan.cou_id)
  • Buffers: shared hit=139
13. 0.491 0.491 ↑ 1.0 3,209 1

Seq Scan on produit.vcouv vco1 (cost=0.00..116.09 rows=3,209 width=8) (actual time=0.006..0.491 rows=3,209 loops=1)

  • Output: vco1.vco_id, vco1.cou_id, vco1.vco_no_vari, vco1.pec_id, vco1.tde1x_nom_table, vco1.tde1y_nom_table, vco1.tde2x_nom_table, vco1.tde2y_nom_table, vco1.tin1x_
  • Buffers: shared hit=84
14. 0.199 0.994 ↑ 1.0 752 1

Hash (cost=92.60..92.60 rows=752 width=49) (actual time=0.994..0.994 rows=752 loops=1)

  • Output: couv_lan.nom_couv, couv_lan.nom_pour_gest, couv_lan.cou_id
  • Buckets: 1024 Batches: 1 Memory Usage: 70kB
  • Buffers: shared hit=55
15. 0.795 0.795 ↑ 1.0 752 1

Seq Scan on produit.couv_lan (cost=0.00..92.60 rows=752 width=49) (actual time=0.005..0.795 rows=752 loops=1)

  • Output: couv_lan.nom_couv, couv_lan.nom_pour_gest, couv_lan.cou_id
  • Filter: ((couv_lan.lan)::text = 'FR'::text)
  • Rows Removed by Filter: 2256
  • Buffers: shared hit=55
Planning time : 4.123 ms
Execution time : 108,112.615 ms