explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Z1Rz : Optimization for: Optimization for: Optimization for: Optimization for: plan #IkBn; plan #Ugqm; plan #oIwj; plan #wLUO

Settings

Optimization path:

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 3.046 39.959 ↓ 21.2 5,141 1

Nested Loop (cost=396.14..3,627.69 rows=243 width=1,055) (actual time=5.854..39.959 rows=5,141 loops=1)

2. 7.995 16.349 ↓ 7.0 5,141 1

Hash Join (cost=395.72..2,443.82 rows=731 width=982) (actual time=5.835..16.349 rows=5,141 loops=1)

  • Hash Cond: ((fec.ccm_clave_acceso)::text = (cnc.cnc_clave_acceso)::text)
3. 2.744 3.569 ↓ 1.0 7,066 1

Bitmap Heap Scan on fe_comprobante fec (cost=135.04..2,149.34 rows=7,064 width=274) (actual time=0.992..3.569 rows=7,066 loops=1)

  • Recheck Cond: ((ccm_documento)::text = 'NCC'::text)
  • Heap Blocks: exact=992
4. 0.825 0.825 ↓ 1.0 7,066 1

Bitmap Index Scan on idx_fe_comprobante_ccm_documento (cost=0.00..133.27 rows=7,064 width=0) (actual time=0.825..0.825 rows=7,066 loops=1)

  • Index Cond: ((ccm_documento)::text = 'NCC'::text)
5. 3.235 4.785 ↑ 1.0 5,152 1

Hash (cost=194.75..194.75 rows=5,275 width=708) (actual time=4.785..4.785 rows=5,152 loops=1)

  • Buckets: 8192 Batches: 1 Memory Usage: 1160kB
6. 1.550 1.550 ↑ 1.0 5,275 1

Seq Scan on cnotacre cnc (cost=0.00..194.75 rows=5,275 width=708) (actual time=0.005..1.550 rows=5,275 loops=1)

7. 20.564 20.564 ↑ 1.0 1 5,141

Index Scan using ccomproba_uk_llave on ccomproba ccm (cost=0.42..1.61 rows=1 width=73) (actual time=0.004..0.004 rows=1 loops=5,141)

  • Index Cond: ((ccm_periodo = cnc.cnc_periodo) AND (cti_id = cnc.cti_id) AND (pve_id = cnc.pve_id) AND (ccm_numero = cnc.cnc_numero))