explain.depesz.com

PostgreSQL's explain analyze made readable

Result: U4dY

Settings
# exclusive inclusive rows x rows loops node
1. 125.471 167,558.141 ↓ 38.8 198,431 1

Nested Loop (cost=306,144.61..2,258,195.65 rows=5,110 width=437) (actual time=1,472.518..167,558.141 rows=198,431 loops=1)

2. 0.019 0.019 ↑ 1.0 1 1

Seq Scan on incremental_tables (cost=0.00..1.55 rows=1 width=8) (actual time=0.011..0.019 rows=1 loops=1)

  • Filter: (table_name = 'OSDIA'::text)
  • Rows Removed by Filter: 43
3. 183.747 167,432.651 ↓ 38.8 198,431 1

Nested Loop Left Join (cost=306,144.61..2,258,104.67 rows=5,110 width=360) (actual time=1,472.500..167,432.651 rows=198,431 loops=1)

4. 15,007.952 16,441.344 ↓ 38.8 198,431 1

Bitmap Heap Scan on osdia (cost=306,086.54..1,961,253.22 rows=5,110 width=313) (actual time=1,472.327..16,441.344 rows=198,431 loops=1)

  • Recheck Cond: ((os_con_mov = 1) AND (ultimo_dl IS NULL) AND (fecha_creacion >= '2020-01-01 00:00:00'::timestamp without time zone))
  • Filter: ((ultimo_fch_reclamo IS NULL) AND (ultimo_dlo IS NULL) AND (GREATEST(ultimo_fch_entrega, ultimo_dlv) IS NULL))
  • Rows Removed by Filter: 78,358
  • Heap Blocks: exact=153,882
5. 34.170 1,433.392 ↓ 0.0 0 1

BitmapAnd (cost=306,086.54..306,086.54 rows=1,026,198 width=0) (actual time=1,433.392..1,433.392 rows=0 loops=1)

6. 151.152 151.152 ↑ 3.6 502,552 1

Bitmap Index Scan on idx_osdia_os_con_mov_ultimodl (cost=0.00..63,879.06 rows=1,810,250 width=0) (actual time=151.152..151.152 rows=502,552 loops=1)

  • Index Cond: ((os_con_mov = 1) AND (ultimo_dl IS NULL))
7. 1,248.070 1,248.070 ↓ 1.0 9,509,706 1

Bitmap Index Scan on osdia_fecha_creacion_index (cost=0.00..242,204.68 rows=9,391,499 width=0) (actual time=1,248.070..1,248.070 rows=9,509,706 loops=1)

  • Index Cond: (fecha_creacion >= '2020-01-01 00:00:00'::timestamp without time zone)
8. 198.431 150,807.560 ↑ 1.0 1 198,431

Limit (cost=58.07..58.07 rows=1 width=173) (actual time=0.759..0.760 rows=1 loops=198,431)

9. 992.155 150,609.129 ↑ 3.0 1 198,431

Sort (cost=58.07..58.08 rows=3 width=173) (actual time=0.759..0.759 rows=1 loops=198,431)

  • Sort Key: carga_piezas_movimientos.pzmv_fch DESC
  • Sort Method: quicksort Memory: 25kB
10. 149,616.974 149,616.974 ↓ 2.7 8 198,431

Index Scan using idx_pzmv_pzas_cdg on carga_piezas_movimientos (cost=0.57..58.05 rows=3 width=173) (actual time=0.205..0.754 rows=8 loops=198,431)

  • Index Cond: (pzas_cdg = ('33000000000000'::bigint + osdia.folio))
  • Filter: ((pzmv_fch <= timezone('America/Santiago'::text, now())) AND (((tpex_cdg)::text <> ALL ('{FI,GE,GI,MI,SG,DG,PP}'::text[])) OR ((tpev_cdg)::text <> ALL ('{MV,CV}'::text[]))))
  • Rows Removed by Filter: 2
Planning time : 0.965 ms
Execution time : 167,600.110 ms