explain.depesz.com

PostgreSQL's explain analyze made readable

Result: seLw : Optimization for: plan #a4lM

Settings

Optimization path:

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 0.944 197,602.155 ↑ 1.0 207 1

HashAggregate (cost=5,453,379.27..5,453,381.37 rows=210 width=88) (actual time=197,602.088..197,602.155 rows=207 loops=1)

  • Output: v0.cpf_numerico, v0.cpf, v0.id_recipients, v0.cpfhash
  • Group Key: v0.cpf_numerico, v0.cpf, v0.id_recipients, v0.cpfhash
  • Buffers: shared hit=47693 read=776556 dirtied=27
2. 1.443 197,601.211 ↑ 1.0 207 1

Nested Loop (cost=0.44..5,453,377.17 rows=210 width=88) (actual time=18,687.255..197,601.211 rows=207 loops=1)

  • Output: v0.cpf_numerico, v0.cpf, v0.id_recipients, v0.cpfhash
  • Buffers: shared hit=47693 read=776556 dirtied=27
3. 193,030.749 193,030.749 ↑ 1.6 259 1

Seq Scan on public.vvavv2_car_cliente v1 (cost=0.00..5,449,816.35 rows=421 width=8) (actual time=10,609.779..193,030.749 rows=259 loops=1)

  • Output: v1.bandeiraoff, v1.bandeiraoncba, v1.bandeiraonext, v1.bandeiraonpfr, v1.comprou, v1.comprouoffcba, v1.comprouoffpfr, v1.comprouoncba, v1.comprouonpfr, v1.datacadastrooff, v1.datafimvigencia, v1.datainiciovigencia, v1.grupopropcdcativo, v1.grupopropcdcir, v1.nomecompletocba, v1.nomecompletoext, v1.nomecompletopfr, v1.ticketmediototalall, v1.tipopreaprovadoelegivel, v1.cpf_numerico, v1.dt_altera, v1.dt_cria, v1.fl_massivo_cb, v1.fl_massivo_ex, v1.fl_massivo_pf, v1.id_recipients, v1.origem_dados, v1.persona, v1.comproucba, v1.comprouext, v1.comproupfr, v1.cpf, v1.cpfhash, v1.datacadastrocba, v1.datacadastroext, v1.datacadastropfr, v1.datacarga, v1.datanascimentocba, v1.datanascimentoext, v1.datanascimentopfr, v1.dataultimavendacba, v1.dataultimavendaext, v1.dataultimavendapfr, v1.generocba, v1.generoext, v1.generopfr, v1.nomecba, v1.nomeext, v1.nomepfr, v1.origemcba, v1.origemext, v1.origempfr, v1.percentualparcelapaga, v1.publicoelegivel, v1.quantidadeparcela, v1.quantidadeparcelaemaberto, v1.valorparcela
  • Filter: ((upper((v1.persona)::text) = 'CONVENIENCIA'::text) AND ((timezone('America/Sao_Paulo'::text, v1.dataultimavendapfr))::date = adddays(('2019-01-09'::date)::timestamp with time zone, (-487))))
  • Rows Removed by Filter: 16824175
  • Buffers: shared hit=46905 read=776302
4. 4,569.019 4,569.019 ↑ 1.0 1 259

Index Scan using to_indexid_recipients_f9ea239e on public.vvavv2_car_cliente_contato v0 (cost=0.44..8.45 rows=1 width=88) (actual time=17.317..17.641 rows=1 loops=259)

  • Output: v0.cpf_numerico, v0.data_optout_cba, v0.data_optout_ext, v0.data_optout_pfr, v0.dominio_email_cba, v0.dominio_email_ext, v0.dominio_email_pfr, v0.dt_altera, v0.dt_cria, v0.fl_massivo_cb, v0.fl_massivo_ex, v0.fl_massivo_pf, v0.id_recipients, v0.origem_dados, v0.cpf, v0.cpfhash, v0.datacarga, v0.emailcba, v0.emailext, v0.emailpfr, v0.flagnewscba, v0.flagnewsext, v0.flagnewspfr, v0.flagsmsnewscba, v0.flagsmsnewsext, v0.flagsmsnewspfr, v0.telefonecelularcba, v0.telefonecelularext, v0.telefonecelularpfr
  • Index Cond: (v0.id_recipients = v1.id_recipients)
  • Filter: (v0.emailpfr IS NOT NULL)
  • Rows Removed by Filter: 0
  • Buffers: shared hit=788 read=254 dirtied=27