explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 6o9u

Settings
# exclusive inclusive rows x rows loops node
1. 0.667 55.884 ↓ 2.0 2 1

GroupAggregate (cost=2,027.23..2,027.89 rows=1 width=334) (actual time=55.690..55.884 rows=2 loops=1)

  • Group Key: ped.ped_nidpedido, ((((cliente.cli_nrutcliente)::text || '-'::text) || (cliente.cli_sdigverificador)::text)), ped.ped_nrutoperador, territorio.ter_scodterritorio, zona.zon_sdeszona, cliente.cli_stipocluster, jerarquia_categoria.jca_scodcategor (...)
2. 0.029 55.217 ↓ 2.0 2 1

Sort (cost=2,027.23..2,027.24 rows=1 width=129) (actual time=55.216..55.217 rows=2 loops=1)

  • Sort Key: ped.ped_nidpedido, ((((cliente.cli_nrutcliente)::text || '-'::text) || (cliente.cli_sdigverificador)::text)), territorio.ter_scodterritorio, zona.zon_sdeszona, cliente.cli_stipocluster, jerarquia_categoria.jca_scodcategoria
  • Sort Method: quicksort Memory: 25kB
3. 0.009 55.188 ↓ 2.0 2 1

Nested Loop (cost=12.53..2,027.22 rows=1 width=129) (actual time=32.638..55.188 rows=2 loops=1)

  • Join Filter: (((detalle_pedido.dpe_scodformato)::text = (precio_articulo.pra_scodformato)::text) AND ((detalle_pedido.dpe_scodvariedad)::text = (precio_articulo.pra_scodvariedad)::text))
4. 0.005 55.073 ↓ 2.0 2 1

Nested Loop (cost=12.24..2,026.66 rows=1 width=111) (actual time=32.574..55.073 rows=2 loops=1)

  • Join Filter: ((jerarquia_agrupacion.jag_scodcategoria)::text = (jerarquia_categoria.jca_scodcategoria)::text)
  • Rows Removed by Join Filter: 12
5. 0.011 55.054 ↓ 2.0 2 1

Nested Loop (cost=12.24..2,024.10 rows=1 width=97) (actual time=32.561..55.054 rows=2 loops=1)

  • Join Filter: ((jerarquia_productobase.jpb_scodagrupacion)::text = (jerarquia_agrupacion.jag_scodagrupacion)::text)
  • Rows Removed by Join Filter: 62
6. 0.017 55.035 ↓ 2.0 2 1

Nested Loop (cost=12.24..2,017.05 rows=1 width=97) (actual time=32.551..55.035 rows=2 loops=1)

  • Join Filter: ((articulo.art_scodjerproducbase)::text = (jerarquia_productobase.jpb_scodproductobase)::text)
  • Rows Removed by Join Filter: 101
7. 0.006 55.000 ↓ 2.0 2 1

Nested Loop (cost=12.24..1,997.22 rows=1 width=97) (actual time=32.523..55.000 rows=2 loops=1)

8. 0.005 54.966 ↓ 2.0 2 1

Nested Loop (cost=11.96..1,996.38 rows=1 width=81) (actual time=32.507..54.966 rows=2 loops=1)

  • Join Filter: (ped.ped_nrutcliente = cliente.cli_nrutcliente)
9. 0.006 54.943 ↓ 2.0 2 1

Nested Loop (cost=11.54..1,992.96 rows=1 width=83) (actual time=32.489..54.943 rows=2 loops=1)

10. 5.423 54.883 ↓ 3.0 3 1

Nested Loop (cost=10.98..1,984.38 rows=1 width=69) (actual time=30.488..54.883 rows=3 loops=1)

11. 1.610 11.960 ↓ 18.6 7,500 1

Nested Loop (cost=10.56..661.37 rows=403 width=54) (actual time=0.180..11.960 rows=7,500 loops=1)

12. 0.034 0.242 ↓ 7.0 28 1

Hash Join (cost=10.14..61.39 rows=4 width=48) (actual time=0.130..0.242 rows=28 loops=1)

  • Hash Cond: ((territorio.ter_scodzona)::text = (zona.zon_scodzona)::text)
13. 0.119 0.164 ↑ 1.5 28 1

Bitmap Heap Scan on territorio (cost=4.82..55.72 rows=43 width=25) (actual time=0.079..0.164 rows=28 loops=1)

  • Recheck Cond: (ter_nrutoperador = '76265773'::numeric)
  • Filter: (((ter_scodzona)::text >= ''::text) AND ((ter_scodzona)::text <= 'zzzzz'::text) AND ((ter_scodterritorio)::text >= ''::text) AND ((ter_scodterritorio)::text <= 'zzzzz'::text) (...)
  • Rows Removed by Filter: 43
  • Heap Blocks: exact=11
14. 0.045 0.045 ↑ 1.0 71 1

Bitmap Index Scan on idx_ter_extra (cost=0.00..4.81 rows=71 width=0) (actual time=0.045..0.045 rows=71 loops=1)

  • Index Cond: (ter_nrutoperador = '76265773'::numeric)
15. 0.005 0.044 ↑ 1.0 8 1

Hash (cost=5.21..5.21 rows=8 width=33) (actual time=0.044..0.044 rows=8 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
16. 0.039 0.039 ↑ 1.0 8 1

Seq Scan on zona (cost=0.00..5.21 rows=8 width=33) (actual time=0.015..0.039 rows=8 loops=1)

  • Filter: (zon_nrutoperador = '76265773'::numeric)
  • Rows Removed by Filter: 170
17. 10.108 10.108 ↓ 7.2 268 28

Index Scan using idx_rco_operador_territorio on relacion_comer_localcliente (cost=0.42..149.62 rows=37 width=29) (actual time=0.024..0.361 rows=268 loops=28)

  • Index Cond: ((rco_nrutoperador = '76265773'::numeric) AND (rco_nidterritorio = territorio.ter_nidterritorio))
18. 37.500 37.500 ↓ 0.0 0 7,500

Index Scan using "idx$$_1c5d0001" on pedido ped (cost=0.42..3.27 rows=1 width=45) (actual time=0.005..0.005 rows=0 loops=7,500)

  • Index Cond: ((ped_nrutcliente = relacion_comer_localcliente.rco_nrutcliente) AND (ped_nrutoperador = '76265773'::numeric))
  • Filter: ((ped_dfhocreacion >= '2020-03-16 00:00:00'::timestamp without time zone) AND (ped_dfhocreacion <= '2020-03-19 23:59:59'::timestamp without time zone) AND ((ped_scodestado)::text = 'CREA (...)
  • Rows Removed by Filter: 1
19. 0.054 0.054 ↑ 1.0 1 3

Index Scan using pk_detalle_pedido on detalle_pedido (cost=0.55..8.57 rows=1 width=28) (actual time=0.016..0.018 rows=1 loops=3)

  • Index Cond: ((dpe_nidpedido = ped.ped_nidpedido) AND (dpe_nrutoperador = '76265773'::numeric))
  • Filter: (dpe_nporcdescuento > '0'::numeric)
  • Rows Removed by Filter: 8
20. 0.018 0.018 ↑ 1.0 1 2

Index Scan using pk_cliente on cliente (cost=0.42..3.40 rows=1 width=17) (actual time=0.009..0.009 rows=1 loops=2)

  • Index Cond: ((cli_nrutcliente = relacion_comer_localcliente.rco_nrutcliente) AND (cli_nrutoperador = '76265773'::numeric))
21. 0.028 0.028 ↑ 1.0 1 2

Index Scan using pk_articulo on articulo (cost=0.28..0.84 rows=1 width=16) (actual time=0.014..0.014 rows=1 loops=2)

  • Index Cond: (((art_scodformato)::text = (detalle_pedido.dpe_scodformato)::text) AND ((art_scodvariedad)::text = (detalle_pedido.dpe_scodvariedad)::text))
22. 0.018 0.018 ↑ 11.0 52 2

Seq Scan on jerarquia_productobase (cost=0.00..12.70 rows=570 width=10) (actual time=0.006..0.009 rows=52 loops=2)

23. 0.008 0.008 ↑ 5.6 32 2

Seq Scan on jerarquia_agrupacion (cost=0.00..4.80 rows=180 width=10) (actual time=0.002..0.004 rows=32 loops=2)

24. 0.014 0.014 ↑ 8.1 7 2

Seq Scan on jerarquia_categoria (cost=0.00..1.85 rows=57 width=19) (actual time=0.004..0.007 rows=7 loops=2)

  • Filter: (((jca_scodcategoria)::text >= ''::text) AND ((jca_scodcategoria)::text <= 'zzzzz'::text))
  • Rows Removed by Filter: 1
25. 0.106 0.106 ↑ 1.0 1 2

Index Scan using precio_articulo_extra1 on precio_articulo (cost=0.29..0.54 rows=1 width=12) (actual time=0.050..0.053 rows=1 loops=2)

  • Index Cond: (((pra_scodformato)::text = (articulo.art_scodformato)::text) AND ((pra_scodvariedad)::text = (articulo.art_scodvariedad)::text))
  • Filter: ((pra_dfhoiniciovigencia <= sysdate) AND (pra_dfhofinvigencia > sysdate))
  • Rows Removed by Filter: 20
Planning time : 18.742 ms
Execution time : 56.213 ms