explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Ceg9

Settings
# exclusive inclusive rows x rows loops node
1. 1,287.010 4,682.121 ↑ 348.9 3,006 1

HashAggregate (cost=273,778.73..286,889.09 rows=1,048,829 width=37) (actual time=4,678.534..4,682.121 rows=3,006 loops=1)

  • Group Key: c.id_cuenta, c.ctanombre, lgs.id_externo
2. 874.054 3,395.111 ↓ 2.0 2,088,104 1

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

  • Hash Cond: (qh.id_terminal = lgs.id_terminal)
3. 200.485 2,503.840 ↑ 1.0 2,124,388 1

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

4. 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))
5. 1,887.878 2,303.342 ↑ 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=444.491..2,303.342 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
6. 415.464 415.464 ↓ 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=415.464..415.464 rows=2,205,499 loops=1)

  • Index Cond: (id_articulo = 80)
7. 0.012 0.012 ↓ 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.012..0.012 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))
8. 1.083 17.217 ↑ 1.1 3,371 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 240kB
9. 2.746 16.134 ↑ 1.0 3,551 1

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

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

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

11. 4.118 12.062 ↑ 1.0 15,601 1

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

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

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