explain.depesz.com

PostgreSQL's explain analyze made readable

Result: TfBD : Optimization for: plan #E1Bu

Settings

Optimization path:

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 0.003 39,667.290 ↓ 0.0 0 1

Nested Loop (cost=0.56..1,975,943.24 rows=67,322 width=203) (actual time=39,667.290..39,667.290 rows=0 loops=1)

2. 39,667.287 39,667.287 ↓ 0.0 0 1

Seq Scan on nfe_ident ni (cost=0.00..1,256,862.30 rows=100,062 width=29) (actual time=39,667.287..39,667.287 rows=0 loops=1)

  • Filter: ((to_char(dhemi, 'YYYY-MM-DD'::text) >= '2020-08-26'::text) AND (to_char(dhemi, 'YYYY-MM-DD'::text) <= '2020-08-26'::text))
  • Rows Removed by Filter: 20,012,499
3. 0.000 0.000 ↓ 0.0 0

Index Scan using pk_nfe on nfe n (cost=0.56..7.14 rows=1 width=203) (never executed)

  • Index Cond: (((cnpj_emitente)::text = (ni.cnpj_emitente)::text) AND (numero = ni.numero) AND (serie = ni.serie) AND (tpamb = ni.tpamb) AND ((mod)::text = (ni.mod)::text))
Planning time : 2.137 ms