explain.depesz.com

PostgreSQL's explain analyze made readable

Result: uXOZ

Settings
# exclusive inclusive rows x rows loops node
1. 42.474 6,622.067 ↓ 5,104.8 30,629 1

GroupAggregate (cost=43,409.04..43,409.43 rows=6 width=234) (actual time=6,577.208..6,622.067 rows=30,629 loops=1)

  • Group Key: jerarquia_linea.jli_sdeslinea, jerarquia_categoria.jca_sdescategoria, jerarquia_productobase.jpb_sdesproductobase, articulo.art_scodformato, articulo.art_scodvariedad, articulo.art_sdescripcion, relacion_comer_localcliente.rco_nrutcliente, rel (...)
2. 384.344 6,579.593 ↓ 5,620.5 33,723 1

Sort (cost=43,409.04..43,409.05 rows=6 width=234) (actual time=6,577.151..6,579.593 rows=33,723 loops=1)

  • Sort Key: jerarquia_linea.jli_sdeslinea, jerarquia_categoria.jca_sdescategoria, jerarquia_productobase.jpb_sdesproductobase, articulo.art_scodformato, articulo.art_scodvariedad, articulo.art_sdescripcion, relacion_comer_localcliente.rco_nrutcliente (...)
  • Sort Method: quicksort Memory: 10492kB
3. 2.765 6,195.249 ↓ 5,620.5 33,723 1

Append (cost=9,459.01..43,408.96 rows=6 width=234) (actual time=1,788.154..6,195.249 rows=33,723 loops=1)

4. 69.908 1,865.575 ↓ 29,198.0 29,198 1

GroupAggregate (cost=9,459.01..9,459.12 rows=1 width=234) (actual time=1,788.154..1,865.575 rows=29,198 loops=1)

  • Group Key: jerarquia_linea.jli_sdeslinea, jerarquia_categoria.jca_sdescategoria, jerarquia_productobase.jpb_sdesproductobase, articulo.art_scodformato, articulo.art_scodvariedad, relacion_comer_localcliente.rco_nrutcliente, relacion_com (...)
5. 303.126 1,795.667 ↓ 36,199.0 36,199 1

Sort (cost=9,459.01..9,459.02 rows=1 width=192) (actual time=1,788.091..1,795.667 rows=36,199 loops=1)

  • Sort Key: jerarquia_linea.jli_sdeslinea, jerarquia_categoria.jca_sdescategoria, jerarquia_productobase.jpb_sdesproductobase, articulo.art_scodformato, articulo.art_scodvariedad, relacion_comer_localcliente.rco_nrutcliente, relacio (...)
  • Sort Method: quicksort Memory: 11152kB
6. 98.202 1,492.541 ↓ 36,199.0 36,199 1

Nested Loop Left Join (cost=5,452.14..9,459.00 rows=1 width=192) (actual time=34.554..1,492.541 rows=36,199 loops=1)

  • Join Filter: ((jerarquia_categoria.jca_scodlinea)::text = (jerarquia_linea.jli_scodlinea)::text)
  • Rows Removed by Join Filter: 55777
7. 52.621 1,358.140 ↓ 36,199.0 36,199 1

Nested Loop Left Join (cost=5,452.14..9,457.61 rows=1 width=164) (actual time=34.521..1,358.140 rows=36,199 loops=1)

8. 17.314 617.738 ↓ 36,199.0 36,199 1

Nested Loop (cost=5,447.96..9,451.62 rows=1 width=150) (actual time=34.459..617.738 rows=36,199 loops=1)

9. 58.868 455.628 ↓ 36,199.0 36,199 1

Nested Loop (cost=5,447.68..9,445.45 rows=1 width=134) (actual time=34.436..455.628 rows=36,199 loops=1)

10. 19.345 214.130 ↓ 36,526.0 36,526 1

Nested Loop (cost=5,447.40..9,439.05 rows=1 width=94) (actual time=34.394..214.130 rows=36,526 loops=1)

11. 17.780 57.461 ↓ 594.5 12,484 1

Hash Join (cost=5,446.83..9,257.29 rows=21 width=83) (actual time=34.342..57.461 rows=12,484 loops=1)

  • Hash Cond: ((factura.fac_nrutcliente = relacion_comer_localcliente.rco_nrutcliente) AND (factura.fac_nnumlocal = relacion_comer_localcliente.rco_nnumlocal))
12. 5.469 6.650 ↓ 4.7 4,256 1

Bitmap Heap Scan on factura (cost=38.50..3,607.34 rows=911 width=26) (actual time=1.275..6.650 rows=4,256 loops=1)

  • Recheck Cond: ((fac_nrutoperador = '76501303'::numeric) AND (fac_dfhoemision >= to_date('01/12/2017'::character varying, 'dd/mm/yyyy'::character varying)) AND (fac_dfhoemision <= to_date(' (...)
  • Heap Blocks: exact=728
13. 1.181 1.181 ↓ 4.7 4,256 1

Bitmap Index Scan on idx_factura_idx02 (cost=0.00..38.27 rows=911 width=0) (actual time=1.181..1.181 rows=4,256 loops=1)

  • Index Cond: ((fac_nrutoperador = '76501303'::numeric) AND (fac_dfhoemision >= to_date('01/12/2017'::character varying, 'dd/mm/yyyy'::character varying)) AND (fac_dfhoemision <= to_da (...)
14. 9.535 33.031 ↓ 5.1 18,665 1

Hash (cost=5,352.91..5,352.91 rows=3,695 width=68) (actual time=33.031..33.031 rows=18,665 loops=1)

  • Buckets: 32768 (originally 4096) Batches: 1 (originally 1) Memory Usage: 2192kB
15. 7.627 23.496 ↓ 5.1 18,665 1

Nested Loop (cost=9.36..5,352.91 rows=3,695 width=68) (actual time=0.165..23.496 rows=18,665 loops=1)

16. 0.032 0.074 ↑ 1.0 45 1

Bitmap Heap Scan on territorio (cost=4.63..50.02 rows=45 width=40) (actual time=0.051..0.074 rows=45 loops=1)

  • Recheck Cond: (ter_nrutoperador = '76501303'::numeric)
  • Heap Blocks: exact=3
17. 0.042 0.042 ↑ 1.0 45 1

Bitmap Index Scan on idx_ter_extra (cost=0.00..4.62 rows=45 width=0) (actual time=0.042..0.042 rows=45 loops=1)

  • Index Cond: (ter_nrutoperador = '76501303'::numeric)
18. 12.285 15.795 ↓ 13.8 415 45

Bitmap Heap Scan on relacion_comer_localcliente (cost=4.73..117.54 rows=30 width=51) (actual time=0.093..0.351 rows=415 loops=45)

  • Recheck Cond: ((rco_nrutoperador = '76501303'::numeric) AND (rco_nidterritorio = territorio.ter_nidterritorio))
  • Heap Blocks: exact=6274
19. 3.510 3.510 ↓ 13.8 415 45

Bitmap Index Scan on idx_rco_operador_territorio (cost=0.00..4.72 rows=30 width=0) (actual time=0.078..0.078 rows=415 loops=45)

  • Index Cond: ((rco_nrutoperador = '76501303'::numeric) AND (rco_nidterritorio = territorio.ter_nidterritorio))
20. 137.324 137.324 ↓ 3.0 3 12,484

Index Scan using detalle_factura_pk on detalle_factura (cost=0.57..8.65 rows=1 width=41) (actual time=0.009..0.011 rows=3 loops=12,484)

  • Index Cond: ((dfa_nidfactura = factura.fac_nidfactura) AND (dfa_nrutoperador = '76501303'::numeric) AND ((dfa_scodrelacioncomercial)::text = (relacion_comer_localcliente.rco_scodrelacioncomercia (...)
  • Filter: ((dfa_scodvariedad)::text = (CASE WHEN ((dfa_sindbonificado)::text = 'S'::text) THEN dfa_scodvariedadorigen ELSE dfa_scodvariedad END)::text)
21. 182.630 182.630 ↑ 1.0 1 36,526

Index Scan using idx1_articulo on articulo (cost=0.28..6.40 rows=1 width=50) (actual time=0.005..0.005 rows=1 loops=36,526)

  • Index Cond: (((art_scodformato)::text = (detalle_factura.dfa_scodformato)::text) AND ((art_scodvariedad)::text = (detalle_factura.dfa_scodvariedad)::text) AND ((art_scodcomposicion)::text = 'UNITA'::t (...)
22. 144.796 144.796 ↑ 1.0 1 36,199

Index Scan using pk_jerarquia_productobase on jerarquia_productobase (cost=0.28..6.15 rows=1 width=26) (actual time=0.004..0.004 rows=1 loops=36,199)

  • Index Cond: ((jpb_scodproductobase)::text = (articulo.art_scodjerproducbase)::text)
23. 361.990 687.781 ↑ 1.0 1 36,199

Hash Right Join (cost=4.18..5.98 rows=1 width=24) (actual time=0.009..0.019 rows=1 loops=36,199)

  • Hash Cond: ((jerarquia_categoria.jca_scodcategoria)::text = (jerarquia_agrupacion.jag_scodcategoria)::text)
24. 180.995 180.995 ↑ 1.0 57 36,199

Seq Scan on jerarquia_categoria (cost=0.00..1.57 rows=57 width=24) (actual time=0.001..0.005 rows=57 loops=36,199)

25. 36.199 144.796 ↑ 1.0 1 36,199

Hash (cost=4.17..4.17 rows=1 width=10) (actual time=0.004..0.004 rows=1 loops=36,199)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
26. 108.597 108.597 ↑ 1.0 1 36,199

Index Scan using pk_jerarquia_agrupacion on jerarquia_agrupacion (cost=0.14..4.17 rows=1 width=10) (actual time=0.003..0.003 rows=1 loops=36,199)

  • Index Cond: ((jerarquia_productobase.jpb_scodagrupacion)::text = (jag_scodagrupacion)::text)
27. 36.199 36.199 ↑ 5.3 3 36,199

Seq Scan on jerarquia_linea (cost=0.00..1.16 rows=16 width=20) (actual time=0.001..0.001 rows=3 loops=36,199)

28. 2.064 131.006 ↓ 712.0 712 1

GroupAggregate (cost=22,548.64..22,548.77 rows=1 width=234) (actual time=129.023..131.006 rows=712 loops=1)

  • Group Key: jerarquia_linea_1.jli_sdeslinea, jerarquia_categoria_1.jca_sdescategoria, jerarquia_productobase_1.jpb_sdesproductobase, artunit.art_scodformato, artunit.art_scodvariedad, pack.art_sdescripcion, relacion_comer_localcliente_1. (...)
29. 5.257 128.942 ↓ 750.0 750 1

Sort (cost=22,548.64..22,548.64 rows=1 width=203) (actual time=128.883..128.942 rows=750 loops=1)

  • Sort Key: jerarquia_linea_1.jli_sdeslinea, jerarquia_categoria_1.jca_sdescategoria, jerarquia_productobase_1.jpb_sdesproductobase, artunit.art_scodformato, artunit.art_scodvariedad, pack.art_sdescripcion, relacion_comer_localclien (...)
  • Sort Method: quicksort Memory: 224kB
30. 3.125 123.685 ↓ 750.0 750 1

Nested Loop (cost=469.62..22,548.63 rows=1 width=203) (actual time=5.458..123.685 rows=750 loops=1)

31. 1.761 118.310 ↓ 750.0 750 1

Nested Loop (cost=469.34..22,542.06 rows=1 width=168) (actual time=5.387..118.310 rows=750 loops=1)

  • Join Filter: ((detalle_factura_1.dfa_scodrelacioncomercial)::text = (relacion_comer_localcliente_1.rco_scodrelacioncomercial)::text)
  • Rows Removed by Join Filter: 891
32. 1.107 110.549 ↓ 750.0 750 1

Nested Loop Left Join (cost=468.91..22,534.19 rows=1 width=135) (actual time=5.336..110.549 rows=750 loops=1)

33. 0.422 98.942 ↓ 750.0 750 1

Nested Loop Left Join (cost=466.71..22,530.74 rows=1 width=111) (actual time=5.271..98.942 rows=750 loops=1)

34. 0.874 96.270 ↓ 750.0 750 1

Nested Loop (cost=466.57..22,526.53 rows=1 width=111) (actual time=5.251..96.270 rows=750 loops=1)

35. 2.613 92.396 ↓ 750.0 750 1

Nested Loop (cost=466.29..22,520.36 rows=1 width=95) (actual time=5.190..92.396 rows=750 loops=1)

  • Join Filter: ((precio_articulo.pra_dfhoiniciovigencia <= factura_1.fac_dfhocreacion) AND (precio_articulo.pra_dfhofinvigencia > factura_1.fac_dfhocreacion))
  • Rows Removed by Join Filter: 12833
36. 0.732 76.283 ↓ 750.0 750 1

Nested Loop (cost=466.00..22,513.87 rows=1 width=103) (actual time=5.097..76.283 rows=750 loops=1)

37. 0.799 71.051 ↓ 750.0 750 1

Nested Loop (cost=465.72..22,507.47 rows=1 width=83) (actual time=5.062..71.051 rows=750 loops=1)

38. 7.582 68.617 ↓ 327.0 327 1

Hash Join (cost=465.43..22,501.14 rows=1 width=78) (actual time=5.025..68.617 rows=327 loops=1)

  • Hash Cond: (((detalle_factura_1.dfa_scodformato)::text = (pack.art_scodformato)::text) AND ((CASE WHEN ((detalle_factura_1.dfa_sindbonificado)::text = 'S'::text) THEN detalle_f (...)
39. 16.282 57.882 ↓ 56.0 36,526 1

Nested Loop (cost=39.07..22,071.28 rows=652 width=47) (actual time=1.295..57.882 rows=36,526 loops=1)

40. 2.156 3.296 ↓ 4.7 4,256 1

Bitmap Heap Scan on factura factura_1 (cost=38.50..3,607.34 rows=911 width=34) (actual time=1.262..3.296 rows=4,256 loops=1)

  • Recheck Cond: ((fac_nrutoperador = '76501303'::numeric) AND (fac_dfhoemision >= to_date('01/12/2017'::character varying, 'dd/mm/yyyy'::character varying)) AND (fac_ (...)
  • Heap Blocks: exact=728
41. 1.140 1.140 ↓ 4.7 4,256 1

Bitmap Index Scan on idx_factura_idx02 (cost=0.00..38.27 rows=911 width=0) (actual time=1.140..1.140 rows=4,256 loops=1)

  • Index Cond: ((fac_nrutoperador = '76501303'::numeric) AND (fac_dfhoemision >= to_date('01/12/2017'::character varying, 'dd/mm/yyyy'::character varying)) AND ( (...)
42. 38.304 38.304 ↓ 1.8 9 4,256

Index Scan using detalle_factura_pk on detalle_factura detalle_factura_1 (cost=0.57..20.22 rows=5 width=36) (actual time=0.007..0.009 rows=9 loops=4,256)

  • Index Cond: ((dfa_nidfactura = factura_1.fac_nidfactura) AND (dfa_nrutoperador = '76501303'::numeric))
43. 0.893 3.153 ↑ 1.0 2,323 1

Hash (cost=391.51..391.51 rows=2,323 width=41) (actual time=3.153..3.153 rows=2,323 loops=1)

  • Buckets: 4096 Batches: 1 Memory Usage: 213kB
44. 2.116 2.260 ↑ 1.0 2,323 1

Bitmap Heap Scan on articulo pack (cost=48.48..391.51 rows=2,323 width=41) (actual time=0.175..2.260 rows=2,323 loops=1)

  • Recheck Cond: ((art_scodcomposicion)::text = 'PACKS'::text)
  • Heap Blocks: exact=232
45. 0.144 0.144 ↑ 1.0 2,323 1

Bitmap Index Scan on idx_extra_articulo (cost=0.00..47.90 rows=2,323 width=0) (actual time=0.144..0.144 rows=2,323 loops=1)

46. 1.635 1.635 ↓ 2.0 2 327

Index Scan using pk_detalle_pack on detalle_pack (cost=0.29..6.32 rows=1 width=19) (actual time=0.004..0.005 rows=2 loops=327)

  • Index Cond: ((dpk_scodformatopack = (pack.art_scodformato)::numeric) AND (dpk_scodvariedadpack = (pack.art_scodvariedad)::numeric))
47. 4.500 4.500 ↑ 1.0 1 750

Index Scan using idx1_articulo on articulo artunit (cost=0.28..6.39 rows=1 width=20) (actual time=0.006..0.006 rows=1 loops=750)

  • Index Cond: (((art_scodformato)::text = (detalle_pack.dpk_scodformato)::text) AND ((art_scodvariedad)::text = (detalle_pack.dpk_scodvariedad)::text))
48. 13.500 13.500 ↓ 18.0 18 750

Index Scan using precio_articulo_idx on precio_articulo (cost=0.29..6.48 rows=1 width=28) (actual time=0.007..0.018 rows=18 loops=750)

  • Index Cond: (((pra_scodformato)::text = (detalle_pack.dpk_scodformato)::text) AND ((pra_scodvariedad)::text = (detalle_pack.dpk_scodvariedad)::text))
49. 3.000 3.000 ↑ 1.0 1 750

Index Scan using pk_jerarquia_productobase on jerarquia_productobase jerarquia_productobase_1 (cost=0.28..6.15 rows=1 width=26) (actual time=0.004..0.004 rows=1 loops=750)

  • Index Cond: ((jpb_scodproductobase)::text = (artunit.art_scodjerproducbase)::text)
50. 2.250 2.250 ↑ 1.0 1 750

Index Scan using pk_jerarquia_agrupacion on jerarquia_agrupacion jerarquia_agrupacion_1 (cost=0.14..4.17 rows=1 width=10) (actual time=0.003..0.003 rows=1 loops=750)

  • Index Cond: ((jerarquia_productobase_1.jpb_scodagrupacion)::text = (jag_scodagrupacion)::text)
51. 5.250 10.500 ↑ 1.0 1 750

Hash Right Join (cost=2.20..3.43 rows=1 width=34) (actual time=0.008..0.014 rows=1 loops=750)

  • Hash Cond: ((jerarquia_linea_1.jli_scodlinea)::text = (jerarquia_categoria_1.jca_scodlinea)::text)
52. 1.500 1.500 ↑ 1.0 16 750

Seq Scan on jerarquia_linea jerarquia_linea_1 (cost=0.00..1.16 rows=16 width=20) (actual time=0.001..0.002 rows=16 loops=750)

53. 1.500 3.750 ↑ 1.0 1 750

Hash (cost=2.19..2.19 rows=1 width=24) (actual time=0.005..0.005 rows=1 loops=750)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
54. 2.250 2.250 ↑ 1.0 1 750

Index Scan using pk_jerarquia_categoria on jerarquia_categoria jerarquia_categoria_1 (cost=0.14..2.19 rows=1 width=24) (actual time=0.003..0.003 rows=1 loops=750)

  • Index Cond: ((jerarquia_agrupacion_1.jag_scodcategoria)::text = (jca_scodcategoria)::text)
55. 6.000 6.000 ↓ 2.0 2 750

Index Scan using relcomerclie_localclie_idx on relacion_comer_localcliente relacion_comer_localcliente_1 (cost=0.42..7.85 rows=1 width=51) (actual time=0.008..0.008 rows=2 loops=750)

  • Index Cond: ((rco_nrutoperador = '76501303'::numeric) AND (rco_nrutcliente = factura_1.fac_nrutcliente) AND (rco_nnumlocal = factura_1.fac_nnumlocal))
56. 2.250 2.250 ↑ 1.0 1 750

Index Scan using idx_id_territorio on territorio territorio_1 (cost=0.28..6.28 rows=1 width=40) (actual time=0.003..0.003 rows=1 loops=750)

  • Index Cond: ((ter_nrutoperador = '76501303'::numeric) AND (ter_nidterritorio = relacion_comer_localcliente_1.rco_nidterritorio))
57. 0.992 21.201 ↓ 489.0 489 1

GroupAggregate (cost=32.95..33.05 rows=1 width=234) (actual time=20.196..21.201 rows=489 loops=1)

  • Group Key: jerarquia_linea_2.jli_sdeslinea, jerarquia_categoria_2.jca_sdescategoria, jerarquia_productobase_2.jpb_sdesproductobase, articulo_1.art_scodformato, articulo_1.art_scodvariedad, relacion_comer_localcliente_2.rco_nrutcliente, (...)
58. 2.396 20.209 ↓ 494.0 494 1

Sort (cost=32.95..32.95 rows=1 width=192) (actual time=20.162..20.209 rows=494 loops=1)

  • Sort Key: jerarquia_linea_2.jli_sdeslinea, jerarquia_categoria_2.jca_sdescategoria, jerarquia_productobase_2.jpb_sdesproductobase, articulo_1.art_scodformato, articulo_1.art_scodvariedad, relacion_comer_localcliente_2.rco_nrutclie (...)
  • Sort Method: quicksort Memory: 156kB
59. 1.332 17.813 ↓ 494.0 494 1

Nested Loop Left Join (cost=2.52..32.94 rows=1 width=192) (actual time=0.310..17.813 rows=494 loops=1)

60. 0.427 15.493 ↓ 494.0 494 1

Nested Loop (cost=2.39..32.51 rows=1 width=164) (actual time=0.273..15.493 rows=494 loops=1)

61. 0.543 13.584 ↓ 494.0 494 1

Nested Loop (cost=2.11..32.20 rows=1 width=147) (actual time=0.255..13.584 rows=494 loops=1)

  • Join Filter: ((detalle_factura_recorrido.dfr_scodrelacioncomercial)::text = (relacion_comer_localcliente_2.rco_scodrelacioncomercial)::text)
  • Rows Removed by Join Filter: 593
62. 0.402 9.583 ↓ 494.0 494 1

Nested Loop Left Join (cost=1.68..23.74 rows=1 width=114) (actual time=0.213..9.583 rows=494 loops=1)

63. 0.496 8.193 ↓ 494.0 494 1

Nested Loop Left Join (cost=1.54..23.51 rows=1 width=100) (actual time=0.197..8.193 rows=494 loops=1)

64. 0.189 6.709 ↓ 494.0 494 1

Nested Loop (cost=1.40..23.32 rows=1 width=100) (actual time=0.179..6.709 rows=494 loops=1)

65. 0.451 4.544 ↓ 494.0 494 1

Nested Loop (cost=1.12..23.02 rows=1 width=84) (actual time=0.162..4.544 rows=494 loops=1)

66. 0.192 1.129 ↓ 494.0 494 1

Nested Loop (cost=0.84..16.90 rows=1 width=44) (actual time=0.123..1.129 rows=494 loops=1)

67. 0.167 0.167 ↓ 55.0 55 1

Index Scan using idx_factura_rec_idx02 on factura_recorrido (cost=0.42..8.45 rows=1 width=26) (actual time=0.085..0.167 rows=55 loops=1)

  • Index Cond: ((far_nrutoperador = '76501303'::numeric) AND (far_dfhoemision >= to_date('01/12/2017'::character varying, 'dd/mm/yyyy'::character varying)) AND (far_dfhoemision <= (...)
68. 0.770 0.770 ↓ 9.0 9 55

Index Scan using detalle_factura_recorrido_pk on detalle_factura_recorrido (cost=0.42..8.45 rows=1 width=41) (actual time=0.008..0.014 rows=9 loops=55)

  • Index Cond: ((dfr_nidfactura = factura_recorrido.far_nidfactura) AND (dfr_nrutoperador = '76501303'::numeric))
  • Filter: ((dfr_scodvariedad)::text = (CASE WHEN ((dfr_sindbonificado)::text = 'S'::text) THEN dfr_scodvariedadorigen ELSE dfr_scodvariedad END)::text)
69. 2.964 2.964 ↑ 1.0 1 494

Index Scan using pk_articulo on articulo articulo_1 (cost=0.28..6.11 rows=1 width=50) (actual time=0.006..0.006 rows=1 loops=494)

  • Index Cond: (((art_scodformato)::text = (detalle_factura_recorrido.dfr_scodformato)::text) AND ((art_scodvariedad)::text = (detalle_factura_recorrido.dfr_scodvariedad)::text))
  • Filter: ((art_scodcomposicion)::text = 'UNITA'::text)
70. 1.976 1.976 ↑ 1.0 1 494

Index Scan using pk_jerarquia_productobase on jerarquia_productobase jerarquia_productobase_2 (cost=0.28..0.30 rows=1 width=26) (actual time=0.004..0.004 rows=1 loops=494)

  • Index Cond: ((jpb_scodproductobase)::text = (articulo_1.art_scodjerproducbase)::text)
71. 0.988 0.988 ↑ 1.0 1 494

Index Scan using pk_jerarquia_agrupacion on jerarquia_agrupacion jerarquia_agrupacion_2 (cost=0.14..0.19 rows=1 width=10) (actual time=0.002..0.002 rows=1 loops=494)

  • Index Cond: ((jerarquia_productobase_2.jpb_scodagrupacion)::text = (jag_scodagrupacion)::text)
72. 0.988 0.988 ↑ 1.0 1 494

Index Scan using pk_jerarquia_categoria on jerarquia_categoria jerarquia_categoria_2 (cost=0.14..0.23 rows=1 width=24) (actual time=0.002..0.002 rows=1 loops=494)

  • Index Cond: ((jerarquia_agrupacion_2.jag_scodcategoria)::text = (jca_scodcategoria)::text)
73. 3.458 3.458 ↓ 2.0 2 494

Index Scan using idx_direc_relacioncomer on relacion_comer_localcliente relacion_comer_localcliente_2 (cost=0.42..8.45 rows=1 width=51) (actual time=0.006..0.007 rows=2 loops=494)

  • Index Cond: ((rco_nrutoperador = '76501303'::numeric) AND (rco_nrutcliente = factura_recorrido.far_nrutcliente))
  • Filter: (factura_recorrido.far_nnumlocal = rco_nnumlocal)
  • Rows Removed by Filter: 0
74. 1.482 1.482 ↑ 1.0 1 494

Index Scan using idx_id_territorio on territorio territorio_2 (cost=0.28..0.31 rows=1 width=40) (actual time=0.003..0.003 rows=1 loops=494)

  • Index Cond: ((ter_nrutoperador = '76501303'::numeric) AND (ter_nidterritorio = relacion_comer_localcliente_2.rco_nidterritorio))
75. 0.988 0.988 ↑ 1.0 1 494

Index Scan using idx_jli_extra on jerarquia_linea jerarquia_linea_2 (cost=0.14..0.36 rows=1 width=20) (actual time=0.002..0.002 rows=1 loops=494)

  • Index Cond: ((jerarquia_categoria_2.jca_scodlinea)::text = (jli_scodlinea)::text)
76. 0.002 3.657 ↓ 0.0 0 1

GroupAggregate (cost=28.67..28.81 rows=1 width=234) (actual time=3.657..3.657 rows=0 loops=1)

  • Group Key: jerarquia_linea_3.jli_sdeslinea, jerarquia_categoria_3.jca_sdescategoria, jerarquia_productobase_3.jpb_sdesproductobase, artunit_1.art_scodformato, artunit_1.art_scodvariedad, pack_1.art_sdescripcion, relacion_comer_localclie (...)
77. 0.054 3.655 ↓ 0.0 0 1

Sort (cost=28.67..28.68 rows=1 width=203) (actual time=3.655..3.655 rows=0 loops=1)

  • Sort Key: jerarquia_linea_3.jli_sdeslinea, jerarquia_categoria_3.jca_sdescategoria, jerarquia_productobase_3.jpb_sdesproductobase, artunit_1.art_scodformato, artunit_1.art_scodvariedad, pack_1.art_sdescripcion, relacion_comer_loca (...)
  • Sort Method: quicksort Memory: 25kB
78. 0.000 3.601 ↓ 0.0 0 1

Nested Loop Left Join (cost=3.39..28.66 rows=1 width=203) (actual time=3.601..3.601 rows=0 loops=1)

79. 0.001 3.601 ↓ 0.0 0 1

Nested Loop (cost=3.25..28.24 rows=1 width=175) (actual time=3.601..3.601 rows=0 loops=1)

80. 0.001 3.600 ↓ 0.0 0 1

Nested Loop (cost=2.97..27.93 rows=1 width=158) (actual time=3.600..3.600 rows=0 loops=1)

  • Join Filter: ((detalle_factura_recorrido_1.dfr_scodrelacioncomercial)::text = (relacion_comer_localcliente_3.rco_scodrelacioncomercial)::text)
81. 0.001 3.599 ↓ 0.0 0 1

Nested Loop Left Join (cost=2.55..19.47 rows=1 width=125) (actual time=3.599..3.599 rows=0 loops=1)

82. 0.001 3.598 ↓ 0.0 0 1

Nested Loop Left Join (cost=2.41..19.24 rows=1 width=111) (actual time=3.598..3.598 rows=0 loops=1)

83. 0.000 3.597 ↓ 0.0 0 1

Nested Loop (cost=2.26..19.05 rows=1 width=111) (actual time=3.597..3.597 rows=0 loops=1)

84. 0.001 3.597 ↓ 0.0 0 1

Nested Loop (cost=1.99..18.75 rows=1 width=95) (actual time=3.597..3.597 rows=0 loops=1)

  • Join Filter: (((detalle_pack_1.dpk_scodformato)::text = (artunit_1.art_scodformato)::text) AND ((detalle_pack_1.dpk_scodvariedad)::text = (artunit_1.art_scodvariedad)::text))
85. 0.001 3.596 ↓ 0.0 0 1

Nested Loop (cost=1.71..18.37 rows=1 width=87) (actual time=3.596..3.596 rows=0 loops=1)

  • Join Filter: ((precio_articulo_1.pra_dfhoiniciovigencia <= factura_recorrido_1.far_dfhocreacion) AND (precio_articulo_1.pra_dfhofinvigencia > factura_recorrido_1.far_dfhocreacion))
86. 0.000 3.595 ↓ 0.0 0 1

Nested Loop (cost=1.42..17.79 rows=1 width=83) (actual time=3.595..3.595 rows=0 loops=1)

87. 0.427 3.595 ↓ 0.0 0 1

Nested Loop (cost=1.12..17.36 rows=1 width=78) (actual time=3.595..3.595 rows=0 loops=1)

88. 0.606 0.698 ↓ 494.0 494 1

Nested Loop (cost=0.84..16.90 rows=1 width=47) (actual time=0.080..0.698 rows=494 loops=1)

  • -> Index Scan using detalle_factura_recorrido_pk on detalle_factura_recorrido detalle_factura_recorrido_1 (cost=0.42..8.44 rows=1 width=36) (actual time=0.005..0. (...)
89. 0.092 0.092 ↓ 55.0 55 1

Index Scan using idx_factura_rec_idx02 on factura_recorrido factura_recorrido_1 (cost=0.42..8.45 rows=1 width=34) (actual time=0.058..0.092 rows=55 loops=1)

  • Index Cond: ((far_nrutoperador = '76501303'::numeric) AND (far_dfhoemision >= to_date('01/12/2017'::character varying, 'dd/mm/yyyy'::character varying)) AND ( (...)
  • Index Cond: ((dfr_nidfactura = factura_recorrido_1.far_nidfactura) AND (dfr_nrutoperador = '76501303'::numeric))
90. 2.470 2.470 ↓ 0.0 0 494

Index Scan using pk_articulo on articulo pack_1 (cost=0.29..0.47 rows=1 width=41) (actual time=0.005..0.005 rows=0 loops=494)

  • Index Cond: (((art_scodformato)::text = (detalle_factura_recorrido_1.dfr_scodformato)::text) AND ((art_scodvariedad)::text = (CASE WHEN ((detalle_factura_recorrido_ (...)
  • Filter: ((art_scodcomposicion)::text = 'PACKS'::text)
  • Rows Removed by Filter: 1
91. 0.000 0.000 ↓ 0.0 0

Index Scan using pk_detalle_pack on detalle_pack detalle_pack_1 (cost=0.29..0.42 rows=1 width=19) (never executed)

  • Index Cond: ((dpk_scodformatopack = (pack_1.art_scodformato)::numeric) AND (dpk_scodvariedadpack = (pack_1.art_scodvariedad)::numeric))
92. 0.000 0.000 ↓ 0.0 0

Index Scan using pk_precio_articulo on precio_articulo precio_articulo_1 (cost=0.29..0.57 rows=1 width=28) (never executed)

  • Index Cond: (((pra_scodformato)::text = (detalle_pack_1.dpk_scodformato)::text) AND ((pra_scodvariedad)::text = (detalle_pack_1.dpk_scodvariedad)::text))
93. 0.000 0.000 ↓ 0.0 0

Index Scan using pk_articulo on articulo artunit_1 (cost=0.28..0.36 rows=1 width=20) (never executed)

  • Index Cond: (((art_scodformato)::text = (precio_articulo_1.pra_scodformato)::text) AND ((art_scodvariedad)::text = (precio_articulo_1.pra_scodvariedad)::text))
94. 0.000 0.000 ↓ 0.0 0

Index Scan using pk_jerarquia_productobase on jerarquia_productobase jerarquia_productobase_3 (cost=0.28..0.30 rows=1 width=26) (never executed)

  • Index Cond: ((jpb_scodproductobase)::text = (artunit_1.art_scodjerproducbase)::text)
95. 0.000 0.000 ↓ 0.0 0

Index Scan using pk_jerarquia_agrupacion on jerarquia_agrupacion jerarquia_agrupacion_3 (cost=0.14..0.19 rows=1 width=10) (never executed)

  • Index Cond: ((jerarquia_productobase_3.jpb_scodagrupacion)::text = (jag_scodagrupacion)::text)
96. 0.000 0.000 ↓ 0.0 0

Index Scan using pk_jerarquia_categoria on jerarquia_categoria jerarquia_categoria_3 (cost=0.14..0.23 rows=1 width=24) (never executed)

  • Index Cond: ((jerarquia_agrupacion_3.jag_scodcategoria)::text = (jca_scodcategoria)::text)
97. 0.000 0.000 ↓ 0.0 0

Index Scan using idx_direc_relacioncomer on relacion_comer_localcliente relacion_comer_localcliente_3 (cost=0.42..8.45 rows=1 width=51) (never executed)

  • Index Cond: ((rco_nrutoperador = '76501303'::numeric) AND (rco_nrutcliente = factura_recorrido_1.far_nrutcliente))
  • Filter: (factura_recorrido_1.far_nnumlocal = rco_nnumlocal)
98. 0.000 0.000 ↓ 0.0 0

Index Scan using idx_id_territorio on territorio territorio_3 (cost=0.28..0.31 rows=1 width=40) (never executed)

  • Index Cond: ((ter_nrutoperador = '76501303'::numeric) AND (ter_nidterritorio = relacion_comer_localcliente_3.rco_nidterritorio))
99. 0.000 0.000 ↓ 0.0 0

Index Scan using idx_jli_extra on jerarquia_linea jerarquia_linea_3 (cost=0.14..0.36 rows=1 width=20) (never executed)

  • Index Cond: ((jerarquia_categoria_3.jca_scodlinea)::text = (jli_scodlinea)::text)
100. 7.439 4,052.031 ↓ 3,249.0 3,249 1

GroupAggregate (cost=5,659.19..5,659.30 rows=1 width=234) (actual time=4,044.134..4,052.031 rows=3,249 loops=1)

  • Group Key: jerarquia_linea_4.jli_sdeslinea, jerarquia_categoria_4.jca_sdescategoria, jerarquia_productobase_4.jpb_sdesproductobase, articulo_2.art_scodformato, articulo_2.art_scodvariedad, relacion_comer_localcliente_4.rco_nrutcliente, (...)
101. 25.728 4,044.592 ↓ 3,592.0 3,592 1

Sort (cost=5,659.19..5,659.19 rows=1 width=192) (actual time=4,044.076..4,044.592 rows=3,592 loops=1)

  • Sort Key: jerarquia_linea_4.jli_sdeslinea, jerarquia_categoria_4.jca_sdescategoria, jerarquia_productobase_4.jpb_sdesproductobase, articulo_2.art_scodformato, articulo_2.art_scodvariedad, relacion_comer_localcliente_4.rco_nrutclie (...)
  • Sort Method: quicksort Memory: 1051kB
102. 18.355 4,018.864 ↓ 3,592.0 3,592 1

Nested Loop Semi Join (cost=2.40..5,659.18 rows=1 width=192) (actual time=0.994..4,018.864 rows=3,592 loops=1)

  • Join Filter: (nota_credito.ncr_nidnotacredito = factura_notacredito.fan_nidnotacredito)
103. 5.816 322.375 ↓ 4,502.0 4,502 1

Nested Loop Left Join (cost=1.98..5,429.03 rows=1 width=197) (actual time=0.312..322.375 rows=4,502 loops=1)

  • Join Filter: ((jerarquia_categoria_4.jca_scodlinea)::text = (jerarquia_linea_4.jli_scodlinea)::text)
  • Rows Removed by Join Filter: 6714
104. 12.155 312.057 ↓ 4,502.0 4,502 1

Nested Loop Left Join (cost=1.98..5,427.67 rows=1 width=187) (actual time=0.306..312.057 rows=4,502 loops=1)

  • Join Filter: ((jerarquia_agrupacion_4.jag_scodcategoria)::text = (jerarquia_categoria_4.jca_scodcategoria)::text)
  • Rows Removed by Join Filter: 44696
105. 26.669 290.898 ↓ 4,502.0 4,502 1

Nested Loop Left Join (cost=1.98..5,425.39 rows=1 width=173) (actual time=0.297..290.898 rows=4,502 loops=1)

  • Join Filter: ((jerarquia_productobase_4.jpb_scodagrupacion)::text = (jerarquia_agrupacion_4.jag_scodagrupacion)::text)
  • Rows Removed by Join Filter: 191786
106. 48.846 241.719 ↓ 4,502.0 4,502 1

Nested Loop (cost=1.98..5,419.41 rows=1 width=173) (actual time=0.279..241.719 rows=4,502 loops=1)

  • Join Filter: ((articulo_2.art_scodjerproducbase)::text = (jerarquia_productobase_4.jpb_scodproductobase)::text)
  • Rows Removed by Join Filter: 341078
107. 6.731 156.857 ↓ 4,502.0 4,502 1

Nested Loop (cost=1.98..5,399.83 rows=1 width=157) (actual time=0.257..156.857 rows=4,502 loops=1)

108. 4.447 109.122 ↓ 4,556.0 4,556 1

Nested Loop (cost=1.69..5,396.55 rows=1 width=117) (actual time=0.236..109.122 rows=4,556 loops=1)

  • Join Filter: ((relacion_comer_localcliente_4.rco_scodrelacioncomercial)::text = (detalle_notacredito.dnc_scodrelacioncomercial)::text)
  • Rows Removed by Join Filter: 8834
109. 4.338 55.362 ↓ 498.1 4,483 1

Nested Loop (cost=1.14..5,319.29 rows=9 width=83) (actual time=0.175..55.362 rows=4,483 loops=1)

110. 22.710 33.072 ↓ 106.9 4,488 1

Nested Loop (cost=0.86..5,306.19 rows=42 width=66) (actual time=0.156..33.072 rows=4,488 loops=1)

  • -> Index Scan using relcomerclie_localclie_idx on relacion_comer_localcliente relacion_comer_localcliente_4 (cost=0.42..8.19 rows=1 width=51) (actual time=0.009..0.012 rows=3 (...)
111. 10.362 10.362 ↓ 4.0 1,525 1

Index Scan using idx_notacredito_consul on nota_credito (cost=0.43..2,213.71 rows=377 width=26) (actual time=0.061..10.362 rows=1,525 loops=1)

  • Index Cond: ((ncr_nrutoperador = '76501303'::numeric) AND (ncr_dfhoemision >= to_date('01/12/2017'::character varying, 'dd/mm/yyyy'::character varying)) AND (ncr_dfhoemis (...)
  • Filter: ((ncr_scoddoctooriginal)::text = 'FACTU'::text)
  • Index Cond: ((rco_nrutoperador = '76501303'::numeric) AND (rco_nrutcliente = nota_credito.ncr_nrutcliente) AND (rco_nnumlocal = nota_credito.ncr_nnumlocal))
112. 17.952 17.952 ↑ 1.0 1 4,488

Index Scan using idx_id_territorio on territorio territorio_4 (cost=0.28..0.31 rows=1 width=40) (actual time=0.004..0.004 rows=1 loops=4,488)

  • Index Cond: ((ter_nrutoperador = '76501303'::numeric) AND (ter_nidterritorio = relacion_comer_localcliente_4.rco_nidterritorio))
113. 49.313 49.313 ↓ 3.0 3 4,483

Index Scan using pk_detalle_notacredito on detalle_notacredito (cost=0.56..8.57 rows=1 width=41) (actual time=0.008..0.011 rows=3 loops=4,483)

  • Index Cond: ((dnc_nidnotacredito = nota_credito.ncr_nidnotacredito) AND (dnc_nrutoperador = '76501303'::numeric))
  • Filter: ((dnc_scodvariedad)::text = (CASE WHEN ((dnc_sindbonificado)::text = 'S'::text) THEN dnc_scodvariedadorigen ELSE dnc_scodvariedad END)::text)
114. 41.004 41.004 ↑ 1.0 1 4,556

Index Scan using pk_articulo on articulo articulo_2 (cost=0.28..3.28 rows=1 width=50) (actual time=0.009..0.009 rows=1 loops=4,556)

  • Index Cond: (((art_scodformato)::text = (detalle_notacredito.dnc_scodformato)::text) AND ((art_scodvariedad)::text = (detalle_notacredito.dnc_scodvariedad)::text))
  • Filter: ((art_scodcomposicion)::text = 'UNITA'::text)
  • Rows Removed by Filter: 0
115. 36.016 36.016 ↑ 7.3 77 4,502

Seq Scan on jerarquia_productobase jerarquia_productobase_4 (cost=0.00..12.59 rows=559 width=26) (actual time=0.002..0.008 rows=77 loops=4,502)

116. 22.510 22.510 ↑ 4.0 44 4,502

Seq Scan on jerarquia_agrupacion jerarquia_agrupacion_4 (cost=0.00..3.77 rows=177 width=10) (actual time=0.002..0.005 rows=44 loops=4,502)

117. 9.004 9.004 ↑ 5.2 11 4,502

Seq Scan on jerarquia_categoria jerarquia_categoria_4 (cost=0.00..1.57 rows=57 width=24) (actual time=0.001..0.002 rows=11 loops=4,502)

118. 4.502 4.502 ↑ 8.0 2 4,502

Seq Scan on jerarquia_linea jerarquia_linea_4 (cost=0.00..1.16 rows=16 width=20) (actual time=0.001..0.001 rows=2 loops=4,502)

119. 3,678.134 3,678.134 ↑ 1.0 1 4,502

Index Only Scan using pk_factura_notacredito on factura_notacredito (cost=0.42..230.10 rows=1 width=15) (actual time=0.817..0.817 rows=1 loops=4,502)

  • Index Cond: ((fan_nrutoperador = '76501303'::numeric) AND (fan_nidnotacredito = detalle_notacredito.dnc_nidnotacredito))
  • Heap Fetches: 3592
120. 0.265 119.014 ↓ 75.0 75 1

GroupAggregate (cost=5,679.71..5,679.85 rows=1 width=234) (actual time=118.800..119.014 rows=75 loops=1)

  • Group Key: jerarquia_linea_5.jli_sdeslinea, jerarquia_categoria_5.jca_sdescategoria, jerarquia_productobase_5.jpb_sdesproductobase, artunit_2.art_scodformato, artunit_2.art_scodvariedad, relacion_comer_localcliente_5.rco_nrutcliente, re (...)
121. 0.409 118.749 ↓ 75.0 75 1

Sort (cost=5,679.71..5,679.72 rows=1 width=203) (actual time=118.744..118.749 rows=75 loops=1)

  • Sort Key: jerarquia_linea_5.jli_sdeslinea, jerarquia_categoria_5.jca_sdescategoria, jerarquia_productobase_5.jpb_sdesproductobase, artunit_2.art_scodformato, artunit_2.art_scodvariedad, relacion_comer_localcliente_5.rco_nrutclient (...)
  • Sort Method: quicksort Memory: 44kB
122. 0.576 118.340 ↓ 75.0 75 1

Nested Loop Semi Join (cost=3.27..5,679.70 rows=1 width=203) (actual time=4.484..118.340 rows=75 loops=1)

  • Join Filter: (nota_credito_1.ncr_nidnotacredito = factura_notacredito_1.fan_nidnotacredito)
123. 0.178 56.054 ↓ 85.0 85 1

Nested Loop Left Join (cost=2.84..5,535.73 rows=1 width=208) (actual time=3.789..56.054 rows=85 loops=1)

  • Join Filter: ((jerarquia_categoria_5.jca_scodlinea)::text = (jerarquia_linea_5.jli_scodlinea)::text)
  • Rows Removed by Join Filter: 130
124. 0.184 55.791 ↓ 85.0 85 1

Nested Loop (cost=2.84..5,534.37 rows=1 width=198) (actual time=3.781..55.791 rows=85 loops=1)

125. 0.244 55.267 ↓ 85.0 85 1

Nested Loop (cost=2.56..5,534.06 rows=1 width=181) (actual time=3.750..55.267 rows=85 loops=1)

  • Join Filter: ((detalle_notacredito_1.dnc_scodrelacioncomercial)::text = (relacion_comer_localcliente_5.rco_scodrelacioncomercial)::text)
  • Rows Removed by Join Filter: 97
126. 0.247 54.173 ↓ 85.0 85 1

Nested Loop Left Join (cost=2.14..5,525.85 rows=1 width=141) (actual time=3.717..54.173 rows=85 loops=1)

  • Join Filter: ((jerarquia_agrupacion_5.jag_scodcategoria)::text = (jerarquia_categoria_5.jca_scodcategoria)::text)
  • Rows Removed by Join Filter: 951
127. 0.539 53.756 ↓ 85.0 85 1

Nested Loop Left Join (cost=2.14..5,523.57 rows=1 width=127) (actual time=3.701..53.756 rows=85 loops=1)

  • Join Filter: ((jerarquia_productobase_5.jpb_scodagrupacion)::text = (jerarquia_agrupacion_5.jag_scodagrupacion)::text)
  • Rows Removed by Join Filter: 3952
128. 0.730 52.792 ↓ 85.0 85 1

Nested Loop (cost=2.14..5,517.59 rows=1 width=127) (actual time=3.684..52.792 rows=85 loops=1)

  • Join Filter: ((artunit_2.art_scodjerproducbase)::text = (jerarquia_productobase_5.jpb_scodproductobase)::text)
  • Rows Removed by Join Filter: 4029
129. 0.225 51.637 ↓ 85.0 85 1

Nested Loop (cost=2.14..5,498.01 rows=1 width=111) (actual time=3.660..51.637 rows=85 loops=1)

  • Join Filter: (((detalle_pack_2.dpk_scodformato)::text = (artunit_2.art_scodformato)::text) AND ((detalle_pack_2.dpk_scodvariedad)::text = (artunit_2.art_scodvariedad)::text))
130. 0.377 50.987 ↓ 85.0 85 1

Nested Loop (cost=1.85..5,497.64 rows=1 width=73) (actual time=3.638..50.987 rows=85 loops=1)

  • Join Filter: ((precio_articulo_2.pra_dfhoiniciovigencia <= nota_credito_1.ncr_dfhocreacion) AND (precio_articulo_2.pra_dfhofinvigencia > nota_credito_1.ncr_dfhocreacion))
  • Rows Removed by Join Filter: 1375
131. 0.208 48.145 ↓ 85.0 85 1

Nested Loop (cost=1.57..5,497.05 rows=1 width=69) (actual time=3.576..48.145 rows=85 loops=1)

132. 3.563 47.559 ↓ 54.0 54 1

Nested Loop (cost=1.27..5,496.63 rows=1 width=64) (actual time=3.540..47.559 rows=54 loops=1)

133. 21.216 21.216 ↓ 30.4 4,556 1

Nested Loop (cost=0.99..5,447.20 rows=150 width=63) (actual time=0.124..21.216 rows=4,556 loops=1)

  • -> Index Scan using idx_notacredito_consul on nota_credito nota_credito_1 (cost=0.43..2213.71 rows=377 width=34) (actual time=0.087..5.571 rows=1525 loops=1 (...)
  • Index Cond: ((ncr_nrutoperador = '76501303'::numeric) AND (ncr_dfhoemision >= to_date('01/12/2017'::character varying, 'dd/mm/yyyy'::character varying)) (...)
  • Filter: ((ncr_scoddoctooriginal)::text = 'FACTU'::text)
  • -> Index Scan using pk_detalle_notacredito on detalle_notacredito detalle_notacredito_1 (cost=0.56..8.57 rows=1 width=36) (actual time=0.008..0.008 rows=3 l (...)
  • Index Cond: ((dnc_nidnotacredito = nota_credito_1.ncr_nidnotacredito) AND (dnc_nrutoperador = '76501303'::numeric))
134. 22.780 22.780 ↓ 0.0 0 4,556

Index Scan using pk_articulo on articulo pack_2 (cost=0.29..0.33 rows=1 width=11) (actual time=0.005..0.005 rows=0 loops=4,556)

  • Index Cond: (((art_scodformato)::text = (detalle_notacredito_1.dnc_scodformato)::text) AND ((art_scodvariedad)::text = (CASE WHEN ((detalle_notacredito_1.dnc_ (...)
  • Filter: ((art_scodcomposicion)::text = 'PACKS'::text)
  • Rows Removed by Filter: 1
135. 0.378 0.378 ↓ 2.0 2 54

Index Scan using pk_detalle_pack on detalle_pack detalle_pack_2 (cost=0.29..0.42 rows=1 width=19) (actual time=0.007..0.007 rows=2 loops=54)

  • Index Cond: ((dpk_scodformatopack = (pack_2.art_scodformato)::numeric) AND (dpk_scodvariedadpack = (pack_2.art_scodvariedad)::numeric))
136. 2.465 2.465 ↓ 17.0 17 85

Index Scan using pk_precio_articulo on precio_articulo precio_articulo_2 (cost=0.29..0.57 rows=1 width=28) (actual time=0.011..0.029 rows=17 loops=85)

  • Index Cond: (((pra_scodformato)::text = (detalle_pack_2.dpk_scodformato)::text) AND ((pra_scodvariedad)::text = (detalle_pack_2.dpk_scodvariedad)::text))
137. 0.425 0.425 ↑ 1.0 1 85

Index Scan using pk_articulo on articulo artunit_2 (cost=0.28..0.36 rows=1 width=50) (actual time=0.005..0.005 rows=1 loops=85)

  • Index Cond: (((art_scodformato)::text = (precio_articulo_2.pra_scodformato)::text) AND ((art_scodvariedad)::text = (precio_articulo_2.pra_scodvariedad)::text))
138. 0.425 0.425 ↑ 11.6 48 85

Seq Scan on jerarquia_productobase jerarquia_productobase_5 (cost=0.00..12.59 rows=559 width=26) (actual time=0.003..0.005 rows=48 loops=85)

139. 0.425 0.425 ↑ 3.8 47 85

Seq Scan on jerarquia_agrupacion jerarquia_agrupacion_5 (cost=0.00..3.77 rows=177 width=10) (actual time=0.002..0.005 rows=47 loops=85)

140. 0.170 0.170 ↑ 4.8 12 85

Seq Scan on jerarquia_categoria jerarquia_categoria_5 (cost=0.00..1.57 rows=57 width=24) (actual time=0.002..0.002 rows=12 loops=85)

141. 0.850 0.850 ↓ 2.0 2 85

Index Scan using relcomerclie_localclie_idx on relacion_comer_localcliente relacion_comer_localcliente_5 (cost=0.42..8.19 rows=1 width=51) (actual time=0.009..0.010 rows=2 loops=85)

  • Index Cond: ((rco_nrutoperador = '76501303'::numeric) AND (rco_nrutcliente = nota_credito_1.ncr_nrutcliente) AND (rco_nnumlocal = nota_credito_1.ncr_nnumlocal))
142. 0.340 0.340 ↑ 1.0 1 85

Index Scan using idx_id_territorio on territorio territorio_5 (cost=0.28..0.31 rows=1 width=40) (actual time=0.004..0.004 rows=1 loops=85)

  • Index Cond: ((ter_nrutoperador = '76501303'::numeric) AND (ter_nidterritorio = relacion_comer_localcliente_5.rco_nidterritorio))
143. 0.085 0.085 ↑ 5.3 3 85

Seq Scan on jerarquia_linea jerarquia_linea_5 (cost=0.00..1.16 rows=16 width=20) (actual time=0.001..0.001 rows=3 loops=85)

144. 61.710 61.710 ↑ 1.0 1 85

Index Only Scan using pk_factura_notacredito on factura_notacredito factura_notacredito_1 (cost=0.42..143.92 rows=1 width=15) (actual time=0.726..0.726 rows=1 loops=85)

  • Index Cond: ((fan_nrutoperador = '76501303'::numeric) AND (fan_nidnotacredito = detalle_notacredito_1.dnc_nidnotacredito))
  • Heap Fetches: 75