explain.depesz.com

PostgreSQL's explain analyze made readable

Result: L6mM

Settings
# exclusive inclusive rows x rows loops node
1. 180.126 332,454.222 ↓ 40.7 198,724 1

Nested Loop (cost=306,145.74..2,321,130.83 rows=4,883 width=437) (actual time=7,723.833..332,454.222 rows=198,724 loops=1)

2. 1.941 1.941 ↑ 1.0 1 1

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

  • Filter: (table_name = 'OSDIA'::text)
  • Rows Removed by Filter: 43
3. 258.316 332,272.155 ↓ 40.7 198,724 1

Nested Loop Left Join (cost=306,145.74..2,321,043.83 rows=4,883 width=360) (actual time=7,721.863..332,272.155 rows=198,724 loops=1)

4. 250.160 132,494.943 ↓ 40.7 198,724 1

Nested Loop (cost=306,087.67..2,037,391.52 rows=4,883 width=321) (actual time=7,700.009..132,494.943 rows=198,724 loops=1)

5. 403.533 74,456.257 ↓ 38.6 198,586 1

Nested Loop (cost=306,087.11..2,004,680.89 rows=5,149 width=321) (actual time=7,698.668..74,456.257 rows=198,586 loops=1)

6. 13,619.708 21,270.078 ↓ 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=7,697.396..21,270.078 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
7. 43.891 7,650.370 ↓ 0.0 0 1

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

8. 2,477.185 2,477.185 ↑ 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=2,477.185..2,477.185 rows=502,552 loops=1)

  • Index Cond: ((os_con_mov = 1) AND (ultimo_dl IS NULL))
9. 5,129.294 5,129.294 ↓ 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=5,129.294..5,129.294 rows=9,509,706 loops=1)

  • Index Cond: (fecha_creacion >= '2020-01-01 00:00:00'::timestamp without time zone)
10. 52,782.646 52,782.646 ↑ 1.0 1 198,431

Index Scan using idx_eevv_nmr_serie on especies_valoradas (cost=0.56..8.49 rows=1 width=16) (actual time=0.266..0.266 rows=1 loops=198,431)

  • Index Cond: (eevv_nmr_serie = osdia.folio)
11. 57,788.526 57,788.526 ↑ 1.0 1 198,586

Index Scan using idx_pzas_oser_eevv_nmr_id on carga_piezas (cost=0.56..6.34 rows=1 width=16) (actual time=0.290..0.291 rows=1 loops=198,586)

  • Index Cond: (oser_eevv_nmr_id = especies_valoradas.eevv_nmr_id)
12. 397.448 199,518.896 ↑ 1.0 1 198,724

Limit (cost=58.07..58.07 rows=1 width=173) (actual time=1.003..1.004 rows=1 loops=198,724)

13. 1,192.344 199,121.448 ↑ 3.0 1 198,724

Sort (cost=58.07..58.07 rows=3 width=173) (actual time=1.002..1.002 rows=1 loops=198,724)

  • Sort Key: carga_piezas_movimientos.pzmv_fch DESC
  • Sort Method: quicksort Memory: 25kB
14. 197,929.104 197,929.104 ↓ 2.7 8 198,724

Index Scan using idx_pzmv_pzas_cdg on carga_piezas_movimientos (cost=0.57..58.05 rows=3 width=173) (actual time=0.261..0.996 rows=8 loops=198,724)

  • Index Cond: (pzas_cdg = carga_piezas.pzas_cdg)
  • 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 : 139.227 ms
Execution time : 332,495.149 ms