explain.depesz.com

PostgreSQL's explain analyze made readable

Result: PeH : Optimization for: Optimization for: plan #SU3h; plan #aIg0

Settings

Optimization path:

# exclusive inclusive rows x rows loops node
1. 16,586.501 43,666.348 ↓ 0.0 0 1

Merge Join (cost=36.01..2,091,707.12 rows=2,985,675 width=146) (actual time=43,666.348..43,666.348 rows=0 loops=1)

  • Merge Cond: (tkts.tem_registro_consumo_id = bcr.id)
  • Join Filter: (CASE WHEN (tkts.last_update > bcr.last_update) THEN tkts.last_update ELSE bcr.last_update END >= to_timestamp('20200105'::text, 'YYYYMMDD'::text))
  • Rows Removed by Join Filter: 17884244
2. 9,941.563 9,941.563 ↑ 1.0 17,884,244 1

Index Scan using idx_bill_ticket_call_rec on bill_tickets tkts (cost=0.44..571,787.50 rows=17,884,244 width=48) (actual time=0.008..9,941.563 rows=17,884,244 loops=1)

  • Filter: (id_tem_bill_ivn_central IS NOT NULL)
3. 17,138.284 17,138.284 ↑ 1.0 17,884,244 1

Index Scan using idx_bill_call_records_id_status on tem_registro_consumo bcr (cost=0.44..1,176,774.39 rows=18,012,609 width=102) (actual time=0.026..17,138.284 rows=17,884,244 loops=1)