explain.depesz.com

PostgreSQL's explain analyze made readable

Result: i1aZ

Settings
# exclusive inclusive rows x rows loops node
1. 10.950 2,923.569 ↓ 354.0 354 1

GroupAggregate (cost=406,632.65..406,632.68 rows=1 width=63) (actual time=2,907.451..2,923.569 rows=354 loops=1)

  • Group Key: tp.codigo_usuario_destino, rs.codigo_origen, p.tipo_producto, pcv.valor, tp.estado
2. 153.530 2,912.619 ↓ 51,276.0 51,276 1

Sort (cost=406,632.65..406,632.66 rows=1 width=39) (actual time=2,907.438..2,912.619 rows=51,276 loops=1)

  • Sort Key: tp.codigo_usuario_destino, rs.codigo_origen, p.tipo_producto, pcv.valor
  • Sort Method: external merge Disk: 2840kB
3. 0.000 2,759.089 ↓ 51,276.0 51,276 1

Nested Loop (cost=201,304.31..406,632.64 rows=1 width=39) (actual time=601.513..2,759.089 rows=51,276 loops=1)

4. 29.147 2,662.360 ↓ 51,276.0 51,276 1

Nested Loop (cost=201,303.90..406,631.86 rows=1 width=44) (actual time=601.470..2,662.360 rows=51,276 loops=1)

5. 28.146 2,581.937 ↓ 51,276.0 51,276 1

Nested Loop (cost=201,303.61..406,631.54 rows=1 width=56) (actual time=601.448..2,581.937 rows=51,276 loops=1)

6. 336.953 2,451.239 ↓ 51,276.0 51,276 1

Hash Join (cost=201,303.20..406,630.78 rows=1 width=40) (actual time=601.408..2,451.239 rows=51,276 loops=1)

  • Hash Cond: (((tp.serie_mecanica)::text = (rs.serie_mecanica)::text) AND ((tp.codigo_usuario_destino)::text = (rs.codigo_usuario_responsable)::text))
7. 1,530.126 1,719.492 ↓ 1.7 719,273 1

Bitmap Heap Scan on inve_traspasos_producto tp (cost=20,265.36..214,553.15 rows=422,104 width=42) (actual time=200.393..1,719.492 rows=719,273 loops=1)

  • Recheck Cond: ((estado_bloqueo)::text = 'PEND'::text)
  • Rows Removed by Index Recheck: 4498037
  • Filter: ((serie_mecanica IS NOT NULL) AND ((estado)::text = 'C'::text))
  • Rows Removed by Filter: 261492
  • Heap Blocks: exact=47695 lossy=105473
8. 189.366 189.366 ↓ 1.2 1,003,775 1

Bitmap Index Scan on inve_traspasos_producto_estado_bloqueo_i (cost=0.00..20,159.83 rows=864,986 width=0) (actual time=189.366..189.366 rows=1,003,775 loops=1)

  • Index Cond: ((estado_bloqueo)::text = 'PEND'::text)
9. 47.332 394.794 ↓ 2.3 117,523 1

Hash (cost=179,810.71..179,810.71 rows=51,542 width=43) (actual time=394.794..394.794 rows=117,523 loops=1)

  • Buckets: 65536 (originally 65536) Batches: 4 (originally 2) Memory Usage: 3585kB
10. 347.462 347.462 ↓ 2.3 119,278 1

Index Scan using recu_series_codigo_posesion_i on recu_series rs (cost=0.44..179,810.71 rows=51,542 width=43) (actual time=0.046..347.462 rows=119,278 loops=1)

  • Index Cond: ((codigo_posesion)::text = ANY ('{NCLEO,DTHSA}'::text[]))
  • Filter: ((tipo_serie)::text = ANY ('{EQU,NTB}'::text[]))
  • Rows Removed by Filter: 149495
11. 102.552 102.552 ↑ 1.0 1 51,276

Index Scan using prod_productos_caracteristicas_nombre_i on prod_productos_caracteristicas pc (cost=0.42..0.76 rows=1 width=16) (actual time=0.002..0.002 rows=1 loops=51,276)

  • Index Cond: ((producto_id = rs.producto_id) AND ((nombre)::text = 'CATEGORIA'::text))
12. 51.276 51.276 ↑ 1.0 1 51,276

Index Scan using prod_productos_pk on prod_productos p (cost=0.28..0.31 rows=1 width=12) (actual time=0.001..0.001 rows=1 loops=51,276)

  • Index Cond: (producto_id = rs.producto_id)
13. 102.552 102.552 ↑ 1.0 1 51,276

Index Only Scan using prod_productos_caracteristicas_valores_valor_uk on prod_productos_caracteristicas_valores pcv (cost=0.42..0.77 rows=1 width=11) (actual time=0.001..0.002 rows=1 loops=51,276)

  • Index Cond: (producto_caracteristica_id = pc.producto_caracteristica_id)
  • Heap Fetches: 29675
Planning time : 4.933 ms
Execution time : 2,924.958 ms