explain.depesz.com

PostgreSQL's explain analyze made readable

Result: EWYQ

Settings
# exclusive inclusive rows x rows loops node
1. 0.015 544,055.603 ↓ 0.0 0 1

Limit (cost=0.56..51.11 rows=10 width=146) (actual time=544,055.603..544,055.603 rows=0 loops=1)

2. 2,410.336 544,055.588 ↓ 0.0 0 1

Nested Loop (cost=0.56..5,030,545.94 rows=995,225 width=146) (actual time=544,055.588..544,055.588 rows=0 loops=1)

3. 5,117.932 5,117.932 ↓ 3.0 17,884,244 1

Seq Scan on bill_tickets tkts (cost=0.00..454,466.05 rows=5,961,415 width=48) (actual time=15.101..5,117.932 rows=17,884,244 loops=1)

  • Filter: (COALESCE(id_tem_bill_ivn_central, (-1)) > 0)
4. 536,527.320 536,527.320 ↓ 0.0 0 17,884,244

Index Scan using pk_bill_call_records on tem_registro_consumo bcr (cost=0.56..0.75 rows=1 width=102) (actual time=0.030..0.030 rows=0 loops=17,884,244)

  • Index Cond: (id = tkts.tem_registro_consumo_id)
  • Filter: (((status)::text = 'CHAMADA_TARIFADA'::text) AND (CASE WHEN (tkts.last_update > last_update) THEN tkts.last_update ELSE last_update END >= to_timestamp('20200106'::text, 'YYYYMMDD'::text)))
  • Rows Removed by Filter: 1