explain.depesz.com

PostgreSQL's explain analyze made readable

Result: AkOV

Settings
# exclusive inclusive rows x rows loops node
1. 0.023 25,946.439 ↓ 16.0 16 1

Sort (cost=412,728.43..412,728.43 rows=1 width=211) (actual time=25,946.438..25,946.439 rows=16 loops=1)

  • Sort Key: parametro.par_deslargo01, operador.ope_nrutoperador, operador.ope_sdigverificador
  • Sort Method: quicksort Memory: 27kB
2. 0.036 25,946.416 ↓ 16.0 16 1

GroupAggregate (cost=412,728.37..412,728.42 rows=1 width=211) (actual time=25,946.401..25,946.416 rows=16 loops=1)

  • Group Key: parametro.par_deslargo01, operador.ope_nrutoperador, (CASE lotes_fact_det_electronica.lfde_tipo_documento WHEN 'FACTU'::text THEN 'F'::text WHEN 'NOCRE'::text THEN 'NC'::text ELSE '0'::text END), (CASE lotes_fact_det_electronica.lfde_est (...)
3. 0.142 25,946.380 ↓ 16.0 16 1

Sort (cost=412,728.37..412,728.38 rows=1 width=145) (actual time=25,946.379..25,946.380 rows=16 loops=1)

  • Sort Key: parametro.par_deslargo01, operador.ope_nrutoperador, (CASE lotes_fact_det_electronica.lfde_tipo_documento WHEN 'FACTU'::text THEN 'F'::text WHEN 'NOCRE'::text THEN 'NC'::text ELSE '0'::text END), (CASE lotes_fact_det_electronica.lfd (...)
  • Sort Method: quicksort Memory: 26kB
4. 0.097 25,946.238 ↓ 16.0 16 1

Merge Right Join (cost=292,376.96..412,728.36 rows=1 width=145) (actual time=7,634.968..25,946.238 rows=16 loops=1)

  • Merge Cond: (agrupacion.lfde_rut_operador = operador.ope_nrutoperador)
5. 0.001 6,297.810 ↓ 0.0 0 1

GroupAggregate (cost=279,383.72..279,389.23 rows=200 width=45) (actual time=6,297.810..6,297.810 rows=0 loops=1)

  • Group Key: agrupacion.lfde_rut_operador, agrupacion.lfde_tipo_documento
6. 0.004 6,297.809 ↓ 0.0 0 1

Sort (cost=279,383.72..279,384.35 rows=251 width=21) (actual time=6,297.809..6,297.809 rows=0 loops=1)

  • Sort Key: agrupacion.lfde_rut_operador, agrupacion.lfde_tipo_documento
  • Sort Method: quicksort Memory: 25kB
7. 0.001 6,297.805 ↓ 0.0 0 1

Subquery Scan on agrupacion (cost=279,363.67..279,373.71 rows=251 width=21) (actual time=6,297.805..6,297.805 rows=0 loops=1)

8. 0.002 6,297.804 ↓ 0.0 0 1

GroupAggregate (cost=279,363.67..279,371.20 rows=251 width=29) (actual time=6,297.804..6,297.804 rows=0 loops=1)

  • Group Key: (to_date(((lotes_fact_det_electronica_1.lfde_fecha_creacion)::text)::character varying, 'dd-mm-yyyy'::character varying)), lotes_fact_det_electronica_1.lfde_rut_operador, lotes_fact_det_electronica_1.l (...)
9. 0.006 6,297.802 ↓ 0.0 0 1

Sort (cost=279,363.67..279,364.30 rows=251 width=21) (actual time=6,297.802..6,297.802 rows=0 loops=1)

  • Sort Key: (to_date(((lotes_fact_det_electronica_1.lfde_fecha_creacion)::text)::character varying, 'dd-mm-yyyy'::character varying)), lotes_fact_det_electronica_1.lfde_rut_operador, lotes_fact_det_electronic (...)
  • Sort Method: quicksort Memory: 25kB
10. 6,297.796 6,297.796 ↓ 0.0 0 1

Seq Scan on lotes_fact_det_electronica lotes_fact_det_electronica_1 (cost=0.00..279,353.67 rows=251 width=21) (actual time=6,297.796..6,297.796 rows=0 loops=1)

  • Filter: ((lfde_fecha_creacion < to_date('30/12/2000'::character varying, 'dd/mm/yyyy'::character varying)) AND (lfde_fecha_creacion > (sysdate - 30)))
  • Rows Removed by Filter: 7594374
11. 0.098 19,648.331 ↓ 16.0 16 1

Materialize (cost=12,993.25..133,336.61 rows=1 width=51) (actual time=1,337.149..19,648.331 rows=16 loops=1)

12. 4.418 19,648.233 ↓ 16.0 16 1

Nested Loop Left Join (cost=12,993.25..133,336.61 rows=1 width=51) (actual time=1,337.139..19,648.233 rows=16 loops=1)

13. 0.115 0.263 ↓ 16.0 16 1

Merge Left Join (cost=16.80..16.85 rows=1 width=37) (actual time=0.115..0.263 rows=16 loops=1)

  • Merge Cond: (operador.ope_nrutoperador = parametro.par_numero01)
14. 0.036 0.062 ↓ 16.0 16 1

Sort (cost=1.35..1.35 rows=1 width=24) (actual time=0.050..0.062 rows=16 loops=1)

  • Sort Key: operador.ope_nrutoperador
  • Sort Method: quicksort Memory: 25kB
15. 0.026 0.026 ↓ 16.0 16 1

Seq Scan on operador (cost=0.00..1.34 rows=1 width=24) (actual time=0.018..0.026 rows=16 loops=1)

  • Filter: ((ope_scodestado)::text = 'VIGEN'::text)
  • Rows Removed by Filter: 11
16. 0.041 0.086 ↓ 2.9 20 1

Sort (cost=15.45..15.47 rows=7 width=19) (actual time=0.059..0.086 rows=20 loops=1)

  • Sort Key: parametro.par_numero01
  • Sort Method: quicksort Memory: 26kB
17. 0.045 0.045 ↓ 4.1 29 1

Index Scan using idx_param_numpar on parametro (cost=0.28..15.35 rows=7 width=19) (actual time=0.027..0.045 rows=29 loops=1)

  • Index Cond: (par_numparametro = '23'::numeric)
18. 18,761.008 19,643.552 ↓ 0.0 0 16

Bitmap Heap Scan on lotes_fact_det_electronica (cost=12,976.45..133,319.75 rows=1 width=21) (actual time=1,227.722..1,227.722 rows=0 loops=16)

  • Recheck Cond: (operador.ope_nrutoperador = lfde_rut_operador)
  • Filter: (((lfde_estado)::text = ANY ('{A,I}'::text[])) AND (lfde_fecha_creacion >= to_date('01/03/2005 00:00'::character varying, 'dd/mm/yyyy hh24:mi'::character varying)) AND (lfde_fecha_creacion <= to_date('01/12/200 (...)
  • Rows Removed by Filter: 468998
  • Heap Blocks: exact=311385
19. 882.544 882.544 ↑ 1.0 468,998 16

Bitmap Index Scan on lot_facdet_electro_idx99 (cost=0.00..12,976.45 rows=474,652 width=0) (actual time=55.159..55.159 rows=468,998 loops=16)

  • Index Cond: (operador.ope_nrutoperador = lfde_rut_operador)
Planning time : 0.813 ms
Execution time : 25,946.657 ms