explain.depesz.com

PostgreSQL's explain analyze made readable

Result: d9IN

Settings
# exclusive inclusive rows x rows loops node
1. 2,156.021 11,018.426 ↓ 5.2 129,376 1

Nested Loop Anti Join (cost=811.60..304,310.92 rows=25,053 width=49) (actual time=67.590..11,018.426 rows=129,376 loops=1)

2. 3,757.258 3,821.965 ↓ 10.0 252,022 1

Bitmap Heap Scan on consulta_nfe_sefaz_saida a (cost=811.04..99,623.35 rows=25,108 width=55) (actual time=67.336..3,821.965 rows=252,022 loops=1)

  • Recheck Cond: ((id_empresa = 984) AND (d_emi >= '2020-01-01'::date) AND (d_emi <= '2020-09-30'::date) AND ((cod_mod)::text = '65'::text))
  • Filter: (pesquisa_fts @@ to_tsquery('autorizada'::text))
  • Rows Removed by Filter: 310
  • Heap Blocks: exact=7,281
3. 64.707 64.707 ↓ 10.0 252,332 1

Bitmap Index Scan on consulta_nfe_sefaz_saida_id_empresa_d_emi_cod_mod_idx (cost=0.00..804.76 rows=25,336 width=0) (actual time=64.706..64.707 rows=252,332 loops=1)

  • Index Cond: ((id_empresa = 984) AND (d_emi >= '2020-01-01'::date) AND (d_emi <= '2020-09-30'::date) AND ((cod_mod)::text = '65'::text))
4. 5,040.440 5,040.440 ↓ 0.0 0 252,022

Index Scan using unica_nota on raiz_nfe b (cost=0.56..8.14 rows=1 width=54) (actual time=0.020..0.020 rows=0 loops=252,022)

  • Index Cond: (((cpf_cnpj)::text = '32374580000173'::text) AND (a.n_nf = n_nf) AND ((a.cod_mod)::text = (mod)::text) AND ((mod)::text = '65'::text))
  • Filter: (((a.serie)::text = (ser)::text) AND ((a.inf_nfe)::text = (inf_nfe)::text))
  • Rows Removed by Filter: 1
Planning time : 2.127 ms
Execution time : 11,300.322 ms