explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Tbun

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 210,412.883 ↑ 190.0 17,517,773 1

Gather Merge (cost=224,502,745.97..623,085,867.14 rows=3,328,887,276 width=71) (actual time=168,110.928..210,412.883 rows=17,517,773 loops=1)

  • Buffers: shared hit=8105 read=452947, temp read=937259 written=938986
2. 87,086.655 859,245.585 ↑ 237.5 3,503,555 5

Sort (cost=224,501,745.91..226,582,300.46 rows=832,221,819 width=71) (actual time=165,778.344..171,849.117 rows=3,503,555 loops=5)

  • Sort Key: t73446.ncod_con_gasto, t73601.ncod_fue_finan, dt_fechas_1.nnum_ano
  • Sort Method: external merge Disk: 236760kB
  • Buffers: shared hit=8105 read=452947, temp read=937259 written=938986
3. 134,334.985 772,158.930 ↑ 237.5 3,503,555 5

Merge Join (cost=6,514,349.32..21,226,806.42 rows=832,221,819 width=71) (actual time=109,549.466..154,431.786 rows=3,503,555 loops=5)

  • Buffers: shared hit=8077 read=452947, temp read=565670 written=566751
4. 101,459.485 594,453.195 ↑ 5.7 3,503,555 5

Sort (cost=6,513,545.63..6,563,070.85 rows=19,810,088 width=74) (actual time=109,512.748..118,890.639 rows=3,503,555 loops=5)

  • Sort Key: t74273.nsgk_fecha_ano
  • Sort Method: external merge Disk: 227720kB
  • Buffers: shared hit=7217 read=452947, temp read=565670 written=566751
5. 88,190.055 492,993.710 ↑ 5.7 3,503,555 5

Hash Join (cost=1,192,772.47..2,565,889.12 rows=19,810,088 width=74) (actual time=37,340.082..98,598.742 rows=3,503,555 loops=5)

  • Buffers: shared hit=7197 read=452947, temp read=210678 written=211134
6. 130,220.720 404,790.545 ↑ 2.1 3,503,555 5

Merge Join (cost=1,192,752.56..1,356,667.48 rows=7,489,636 width=40) (actual time=37,337.341..80,958.109 rows=3,503,555 loops=5)

  • Buffers: shared hit=6986 read=452947, temp read=210678 written=211134
7. 102,708.335 232,374.795 ↑ 1.3 3,503,555 5

Sort (cost=1,191,948.88..1,202,897.64 rows=4,379,503 width=37) (actual time=37,302.914..46,474.959 rows=3,503,555 loops=5)

  • Sort Key: t74273.nsgk_fecha_mov
  • Sort Method: external merge Disk: 148240kB
  • Buffers: shared hit=6126 read=452947, temp read=210678 written=211134
8. 86,598.225 129,666.460 ↑ 1.3 3,503,555 5

Hash Join (cost=6.48..568,557.05 rows=4,379,503 width=37) (actual time=1.139..25,933.292 rows=3,503,555 loops=5)

  • Buffers: shared hit=6126 read=452947
9. 43,063.075 43,063.075 ↑ 1.3 3,503,555 5

Seq Scan on mv_ft_deuda t74273 (cost=0..502,858.03 rows=4,379,503 width=23) (actual time=0.073..8,612.615 rows=3,503,555 loops=5)

  • Buffers: shared hit=6116 read=452947
10. 2.610 5.160 ↑ 1.0 199 5

Hash (cost=3.99..3.99 rows=199 width=21) (actual time=1.029..1.032 rows=199 loops=5)

  • Buffers: shared hit=10
11. 2.550 2.550 ↑ 1.0 199 5

Seq Scan on dt_conceptos_gasto t73446 (cost=0..3.99 rows=199 width=21) (actual time=0.038..0.51 rows=199 loops=5)

  • Buffers: shared hit=10
12. 42,113.550 42,195.030 ↓ 417.3 3,505,867 5

Sort (cost=803.68..824.69 rows=8,402 width=10) (actual time=33.082..8,439.006 rows=3,505,867 loops=5)

  • Sort Key: ((dt_fechas.nsgk_fecha)::numeric)
  • Sort Method: quicksort Memory: 778kB
  • Buffers: shared hit=860
13. 81.480 81.480 ↑ 1.0 8,402 5

Seq Scan on dt_fechas dt_fechas (cost=0..256.02 rows=8,402 width=10) (actual time=0.099..16.296 rows=8,402 loops=5)

  • Buffers: shared hit=860
14. 6.625 13.110 ↑ 1.0 529 5

Hash (cost=13.29..13.29 rows=529 width=43) (actual time=2.619..2.622 rows=529 loops=5)

  • Buffers: shared hit=40
15. 6.485 6.485 ↑ 1.0 529 5

Seq Scan on dt_fue_financiacion t73601 (cost=0..13.29 rows=529 width=43) (actual time=0.043..1.297 rows=529 loops=5)

  • Buffers: shared hit=40
16. 43,281.935 43,370.750 ↓ 417.9 3,511,207 5

Sort (cost=803.68..824.69 rows=8,402 width=4) (actual time=35.211..8,674.15 rows=3,511,207 loops=5)

  • Sort Key: ((dt_fechas_1.nsgk_fecha)::numeric)
  • Sort Method: quicksort Memory: 778kB
  • Buffers: shared hit=860
17. 88.815 88.815 ↑ 1.0 8,402 5

Seq Scan on dt_fechas dt_fechas_1 (cost=0..256.02 rows=8,402 width=4) (actual time=0.042..17.763 rows=8,402 loops=5)

  • Buffers: shared hit=860