explain.depesz.com

PostgreSQL's explain analyze made readable

Result: PrWk

Settings
# exclusive inclusive rows x rows loops node
1. 617.586 24,288.591 ↑ 348.9 3,006 1

GroupAggregate (cost=365,553.09..394,395.89 rows=1,048,829 width=37) (actual time=21,620.689..24,288.591 rows=3,006 loops=1)

  • Group Key: c.id_cuenta, c.ctanombre, lgs.id_externo
2. 20,382.760 23,671.005 ↓ 2.0 2,088,104 1

Sort (cost=365,553.09..368,175.16 rows=1,048,829 width=37) (actual time=21,620.035..23,671.005 rows=2,088,104 loops=1)

  • Sort Key: c.id_cuenta, c.ctanombre, lgs.id_externo
  • Sort Method: external merge Disk: 97304kB
3. 949.672 3,288.245 ↓ 2.0 2,088,104 1

Hash Join (cost=2,863.30..260,668.36 rows=1,048,829 width=37) (actual time=377.121..3,288.245 rows=2,088,104 loops=1)

  • Hash Cond: (qh.id_terminal = lgs.id_terminal)
4. 203.296 2,321.239 ↑ 1.0 2,124,388 1

Append (cost=0.00..233,952.42 rows=2,138,297 width=13) (actual time=359.762..2,321.239 rows=2,124,388 loops=1)

5. 0.001 0.001 ↓ 0.0 0 1

Seq Scan on queue_historico qh (cost=0.00..0.00 rows=1 width=28) (actual time=0.001..0.001 rows=0 loops=1)

  • Filter: ((fecha_ingreso_historico >= '2020-01-01 00:00:00'::timestamp without time zone) AND (fecha_ingreso_historico <= '2020-02-01 00:00:00'::timestamp without time zone) AND (id_articulo = 80) AND (id_estado_transaccion = 3))
6. 1,783.902 2,117.898 ↑ 1.0 2,124,388 1

Bitmap Heap Scan on queue_historico_202001 qh_1 (cost=20,881.08..233,950.96 rows=2,138,295 width=13) (actual time=359.761..2,117.898 rows=2,124,388 loops=1)

  • Recheck Cond: (id_articulo = 80)
  • Filter: ((fecha_ingreso_historico >= '2020-01-01 00:00:00'::timestamp without time zone) AND (fecha_ingreso_historico <= '2020-02-01 00:00:00'::timestamp without time zone) AND (id_estado_transaccion = 3))
  • Rows Removed by Filter: 81111
  • Heap Blocks: exact=99276
7. 333.996 333.996 ↓ 1.0 2,205,499 1

Bitmap Index Scan on idx_queue_historico_id_articulo_202001 (cost=0.00..20,346.51 rows=2,200,344 width=0) (actual time=333.996..333.996 rows=2,205,499 loops=1)

  • Index Cond: (id_articulo = 80)
8. 0.044 0.044 ↓ 0.0 0 1

Index Scan using index_fec_ter_usr_queue_historico_202002 on queue_historico_202002 qh_2 (cost=0.43..1.45 rows=1 width=13) (actual time=0.044..0.044 rows=0 loops=1)

  • Index Cond: ((fecha_ingreso_historico >= '2020-01-01 00:00:00'::timestamp without time zone) AND (fecha_ingreso_historico <= '2020-02-01 00:00:00'::timestamp without time zone))
  • Filter: ((id_articulo = 80) AND (id_estado_transaccion = 3))
9. 1.074 17.334 ↑ 1.1 3,371 1

Hash (cost=2,818.91..2,818.91 rows=3,551 width=40) (actual time=17.334..17.334 rows=3,371 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 240kB
10. 2.987 16.260 ↑ 1.0 3,551 1

Hash Join (cost=2,329.02..2,818.91 rows=3,551 width=40) (actual time=11.915..16.260 rows=3,551 loops=1)

  • Hash Cond: (lgs.id_cuenta = c.id_cuenta)
11. 1.406 1.406 ↑ 1.0 3,928 1

Seq Scan on lectograbadores_sube lgs (cost=0.00..405.28 rows=3,928 width=24) (actual time=0.025..1.406 rows=3,928 loops=1)

12. 4.251 11.867 ↑ 1.0 15,601 1

Hash (cost=2,134.01..2,134.01 rows=15,601 width=24) (actual time=11.867..11.867 rows=15,601 loops=1)

  • Buckets: 2048 Batches: 1 Memory Usage: 865kB
13. 7.616 7.616 ↑ 1.0 15,601 1

Seq Scan on cuentas c (cost=0.00..2,134.01 rows=15,601 width=24) (actual time=0.005..7.616 rows=15,601 loops=1)