explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 8kb6

Settings
# exclusive inclusive rows x rows loops node
1. 4,956.138 65,528.696 ↓ 16.0 15,796,684 1

Hash Join (cost=746,990.30..1,901,275.04 rows=987,688 width=171) (actual time=18,448.944..65,528.696 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.vco_id = vco1.vco_id)
  • Buffers: shared hit=5929889 read=710828, temp read=795034 written=794970
2. 33,482.756 60,569.895 ↓ 16.0 15,796,684 1

Hash Join (cost=746,675.94..1,887,379.97 rows=987,688 width=126) (actual time=18,446.271..60,569.895 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
  • 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=5929750 read=710828, temp read=795034 written=794970
3. 8,642.542 8,642.542 ↑ 1.0 15,796,684 1

Seq Scan on odyssee.pa_gen (cost=0.00..903,658.81 rows=15,803,014 width=122) (actual time=0.801..8,642.542 rows=15,796,684 loops=1)

  • Output: pa_gen.pa_id, pa_gen.pa_gen, pa_gen.part_assure1, pa_gen.part_assure2, pa_gen.pol_id, pa_gen.mupo_gen, pa_gen.princ_compl, pa_gen.etat, pa_gen.dte_deb, pa_gen.dte_fin, pa_gen
  • Filter: ((pa_gen.etat)::text = ANY ('{VAL,ANNU}'::text[]))
  • Rows Removed by Filter: 24261
  • Buffers: shared hit=34 read=705863
4. 4,341.050 18,444.597 ↓ 39.9 15,820,945 1

Hash (cost=738,743.30..738,743.30 rows=396,632 width=24) (actual time=18,444.597..18,444.597 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))
  • Buckets: 524288 (originally 524288) Batches: 32 (originally 1) Memory Usage: 31132kB
  • Buffers: shared hit=5929716 read=4965, temp read=36056 written=118358
5. 5,909.094 14,103.547 ↓ 39.9 15,820,945 1

Hash Join (cost=27,593.00..738,743.30 rows=396,632 width=24) (actual time=274.991..14,103.547 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=5929716 read=4965, temp read=36056 written=36054
6. 7,920.641 7,920.641 ↓ 10.0 15,820,945 1

GroupAggregate (cost=0.56..655,025.12 rows=1,582,094 width=16) (actual time=0.052..7,920.641 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=5923071 read=4965
  • -> Index Only Scan using odysse_pa_gen_pol_id_mupo_gen_pa_id_pa_gen on odyssee.pa_gen pa_gen_1 (cost=0.56..480994.73 rows=15820945 width=16) (actual time=0.046..2794.39
  • Output: pa_gen_1.pol_id, pa_gen_1.mupo_gen, pa_gen_1.pa_id, pa_gen_1.pa_gen
  • Heap Fetches: 0
  • Buffers: shared hit=5923071 read=4965
7. 166.091 273.812 ↑ 1.0 793,264 1

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

  • Output: pa.pa_id, pa.vco_id
  • Buckets: 1048576 Batches: 2 Memory Usage: 23682kB
  • Buffers: shared hit=6645, temp written=1356
8. 107.721 107.721 ↑ 1.0 793,264 1

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

  • Output: pa.pa_id, pa.vco_id
  • Buffers: shared hit=6645
9. 0.702 2.663 ↑ 1.0 3,209 1

Hash (cost=274.25..274.25 rows=3,209 width=53) (actual time=2.663..2.663 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
10. 1.039 1.961 ↑ 1.0 3,209 1

Hash Join (cost=102.00..274.25 rows=3,209 width=53) (actual time=0.627..1.961 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
11. 0.305 0.305 ↑ 1.0 3,209 1

Seq Scan on produit.vcouv vco1 (cost=0.00..116.09 rows=3,209 width=8) (actual time=0.004..0.305 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_nom_table, v
  • Buffers: shared hit=84
12. 0.138 0.617 ↑ 1.0 752 1

Hash (cost=92.60..92.60 rows=752 width=49) (actual time=0.617..0.617 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
13. 0.479 0.479 ↑ 1.0 752 1

Seq Scan on produit.couv_lan (cost=0.00..92.60 rows=752 width=49) (actual time=0.003..0.479 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