explain.depesz.com

PostgreSQL's explain analyze made readable

Result: ZKCa

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 12,471.635 ↓ 5.8 2,975 1

Gather Merge (cost=3,737,576.53..3,737,636.73 rows=516 width=153) (actual time=12,428.280..12,471.635 rows=2,975 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
2. 6.420 37,264.140 ↓ 3.8 992 3

Sort (cost=3,736,576.50..3,736,577.15 rows=258 width=153) (actual time=12,421.280..12,421.380 rows=992 loops=3)

  • Sort Key: movimiento_bodega.mov_nidmovimiento
  • Sort Method: quicksort Memory: 214kB
3. 17.874 37,257.720 ↓ 3.8 992 3

Hash Left Join (cost=17.00..3,736,566.17 rows=258 width=153) (actual time=1,750.824..12,419.240 rows=992 loops=3)

  • Hash Cond: ((movimiento_bodega.mov_scodtipodocto)::text = (parametro.par_codparametro01)::text)
4. 2.528 37,239.693 ↓ 3.8 992 3

Nested Loop Left Join (cost=1.44..3,736,542.53 rows=258 width=91) (actual time=1,750.580..12,413.231 rows=992 loops=3)

  • Join Filter: ((movimiento_bodega.mov_scodtipodocto)::text = 'FACTU'::text)
5. 6.174 37,222.290 ↓ 3.8 992 3

Nested Loop Left Join (cost=1.15..3,734,685.24 rows=258 width=85) (actual time=1,750.547..12,407.430 rows=992 loops=3)

  • Join Filter: ((movimiento_bodega.mov_scodtipodocto)::text = 'FACTU'::text)
  • Rows Removed by Join Filter: 77
6. 5.681 37,180.416 ↓ 3.8 992 3

Nested Loop Left Join (cost=0.71..3,732,506.66 rows=258 width=79) (actual time=1,750.508..12,393.472 rows=992 loops=3)

  • Join Filter: ((movimiento_bodega.mov_scodtipodocto)::text = 'NOCRE'::text)
  • Rows Removed by Join Filter: 35
7. 5.406 37,159.860 ↓ 3.8 992 3

Nested Loop (cost=0.28..3,730,376.78 rows=258 width=73) (actual time=1,750.466..12,386.620 rows=992 loops=3)

8. 37,127.679 37,127.679 ↓ 3.8 992 3

Parallel Seq Scan on movimiento_bodega (cost=0.00..3,728,232.15 rows=258 width=68) (actual time=1,750.387..12,375.893 rows=992 loops=3)

  • Filter: (((mov_scodformato)::text = '116'::text) AND ((mov_scodvariedad)::text = '0'::text) AND (mov_nrutoperador = '76783560'::numeric) AND ((mov_scodbodega)::text = 'BOD01'::text) AND (trunc(mov_dfhocreacion) < (...)
  • Rows Removed by Filter: 47318227
9. 26.775 26.775 ↑ 1.0 1 2,975

Index Scan using idx1_articulo on articulo (cost=0.28..8.30 rows=1 width=11) (actual time=0.009..0.009 rows=1 loops=2,975)

  • Index Cond: (((art_scodformato)::text = '116'::text) AND ((art_scodvariedad)::text = '0'::text))
10. 14.875 14.875 ↓ 0.0 0 2,975

Index Scan using pk_nota_credito on nota_credito (cost=0.43..8.24 rows=1 width=21) (actual time=0.005..0.005 rows=0 loops=2,975)

  • Index Cond: ((movimiento_bodega.mov_nnumdocto = ncr_nidnotacredito) AND (movimiento_bodega.mov_nrutoperador = ncr_nrutoperador) AND (ncr_nrutoperador = '76783560'::numeric))
11. 35.700 35.700 ↑ 1.0 1 2,975

Index Scan using pk_factura on factura (cost=0.43..8.43 rows=1 width=21) (actual time=0.012..0.012 rows=1 loops=2,975)

  • Index Cond: ((movimiento_bodega.mov_nnumdocto = fac_nidfactura) AND (movimiento_bodega.mov_nrutoperador = fac_nrutoperador) AND (fac_nrutoperador = '76783560'::numeric))
12. 14.875 14.875 ↓ 0.0 0 2,975

Index Scan using pk_factura_recorrido on factura_recorrido (cost=0.29..7.19 rows=1 width=21) (actual time=0.005..0.005 rows=0 loops=2,975)

  • Index Cond: ((movimiento_bodega.mov_nnumdocto = far_nidfactura) AND (movimiento_bodega.mov_nrutoperador = far_nrutoperador) AND (far_nrutoperador = '76783560'::numeric))
13. 0.042 0.153 ↑ 1.0 7 3

Hash (cost=15.48..15.48 rows=7 width=18) (actual time=0.051..0.051 rows=7 loops=3)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
14. 0.111 0.111 ↑ 1.0 7 3

Index Scan using idx_param_numpar on parametro (cost=0.28..15.48 rows=7 width=18) (actual time=0.030..0.037 rows=7 loops=3)

  • Index Cond: (par_numparametro = '48'::numeric)