explain.depesz.com

PostgreSQL's explain analyze made readable

Result: AOeS

Settings
# exclusive inclusive rows x rows loops node
1. 60.060 388,195.804 ↓ 0.0 0 1

Nested Loop (cost=18.90..18,473.84 rows=1 width=4) (actual time=388,195.804..388,195.804 rows=0 loops=1)

2. 111.893 1,498.049 ↓ 16,795.0 16,795 1

Nested Loop (cost=18.47..16,898.43 rows=1 width=15) (actual time=336.001..1,498.049 rows=16,795 loops=1)

3. 75.199 859.894 ↓ 240.9 27,698 1

Nested Loop (cost=17.92..16,140.76 rows=115 width=29) (actual time=4.608..859.894 rows=27,698 loops=1)

4. 17.615 102.260 ↓ 17.1 52,495 1

Nested Loop (cost=17.49..3,107.57 rows=3,076 width=21) (actual time=0.115..102.260 rows=52,495 loops=1)

5. 0.632 0.936 ↓ 15.2 213 1

Hash Join (cost=12.37..59.24 rows=14 width=15) (actual time=0.092..0.936 rows=213 loops=1)

  • Hash Cond: ((territorio.ter_scodzona)::text = (operador_zona.ozo_scodzona_asociada)::text)
6. 0.231 0.266 ↑ 1.0 213 1

Bitmap Heap Scan on territorio (cost=9.93..55.59 rows=213 width=20) (actual time=0.045..0.266 rows=213 loops=1)

  • Recheck Cond: (ter_nrutoperador = '76155763'::numeric)
  • Heap Blocks: exact=21
7. 0.035 0.035 ↑ 1.0 213 1

Bitmap Index Scan on idx_ter_extra (cost=0.00..9.88 rows=213 width=0) (actual time=0.035..0.035 rows=213 loops=1)

  • Index Cond: (ter_nrutoperador = '76155763'::numeric)
8. 0.007 0.038 ↓ 4.2 21 1

Hash (cost=2.38..2.38 rows=5 width=12) (actual time=0.038..0.038 rows=21 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
9. 0.031 0.031 ↓ 4.2 21 1

Seq Scan on operador_zona (cost=0.00..2.38 rows=5 width=12) (actual time=0.014..0.031 rows=21 loops=1)

  • Filter: ((ozo_nrutoperador = '76155763'::numeric) AND ((ozo_scodzona)::text = '5219'::text))
  • Rows Removed by Filter: 71
10. 70.503 83.709 ↓ 3.0 246 213

Bitmap Heap Scan on relacion_comer_localcliente (cost=5.12..216.92 rows=82 width=29) (actual time=0.079..0.393 rows=246 loops=213)

  • Recheck Cond: ((rco_nrutoperador = '76155763'::numeric) AND (rco_nidterritorio = territorio.ter_nidterritorio))
  • Heap Blocks: exact=25630
11. 13.206 13.206 ↓ 3.0 246 213

Bitmap Index Scan on idx_rco_operador_territorio (cost=0.00..5.09 rows=82 width=0) (actual time=0.062..0.062 rows=246 loops=213)

  • Index Cond: ((rco_nrutoperador = '76155763'::numeric) AND (rco_nidterritorio = territorio.ter_nidterritorio))
12. 682.435 682.435 ↑ 1.0 1 52,495

Index Scan using idx_notacredito_s2venta on nota_credito ncr (cost=0.43..4.23 rows=1 width=43) (actual time=0.009..0.013 rows=1 loops=52,495)

  • Index Cond: ((ncr_nrutoperador = '76155763'::numeric) AND (ncr_nrutcliente = relacion_comer_localcliente.rco_nrutcliente) AND (ncr_nnumlocal = relacion_comer_localcliente.rco_nnumlocal) AND ((ncr_scodrelcomercial)::text = (relacion_come (...)
  • Filter: ((ncr_nnumnotacredito <> '0'::numeric) AND ((ncr_scodestado)::text <> 'NULA'::text) AND ((ncr_scoddoctooriginal)::text = 'FACTU'::text))
13. 526.262 526.262 ↑ 1.0 1 27,698

Index Scan using lot_facdet_electro_idx99 on lotes_fact_det_electronica lfde (cost=0.56..6.58 rows=1 width=21) (actual time=0.017..0.019 rows=1 loops=27,698)

  • Index Cond: ((lfde_rut_operador = '76155763'::numeric) AND (lfde_id_lote = ncr.ncr_nidloteimpresion) AND (lfde_num_factura = ncr.ncr_nnumnotacredito))
  • Filter: ((lfde_estado)::text = ANY ('{A,I}'::text[]))
  • Rows Removed by Filter: 0
14. 386,637.695 386,637.695 ↓ 0.0 0 16,795

Index Only Scan using factura_notacredito_pkey on factura_notacredito (cost=0.43..1,575.40 rows=1 width=15) (actual time=23.021..23.021 rows=0 loops=16,795)

  • Index Cond: ((fan_nrutoperador = '76155763'::numeric) AND (fan_nidnotacredito = ncr.ncr_nidnotacredito))
  • Heap Fetches: 0
Planning time : 8.321 ms
Execution time : 388,195.999 ms