explain.depesz.com

PostgreSQL's explain analyze made readable

Result: s8wJ : teste

Settings
# exclusive inclusive rows x rows loops node
1. 0.045 68,445.578 ↑ 1.0 200 1

Limit (cost=3,855,750.92..3,855,837.92 rows=200 width=443) (actual time=68,445.187..68,445.578 rows=200 loops=1)

2. 0.256 68,445.533 ↑ 7,939.9 200 1

Unique (cost=3,855,750.92..4,546,520.91 rows=1,587,977 width=443) (actual time=68,445.185..68,445.533 rows=200 loops=1)

3. 21,195.545 68,445.277 ↑ 7,939.9 200 1

Sort (cost=3,855,750.92..3,879,570.57 rows=1,587,977 width=443) (actual time=68,445.173..68,445.277 rows=200 loops=1)

  • Sort Key: e.id_evento, e.uuid_evento, e.id_statusevento, e.ds_resultado, e.id_grupoevento, e.id_tipoevento, e.ds_assunto, e.ds_observacao, e.dt_proximaacao, e.dt_conclusao, e.dt_limite, e.ds_temperatura, e.ds_formacontato, e.ds_midia, e.id_pesquisa, e.id_agendamentoerp, e.cd_usuarioinc, e.cd_usuarioalt, e.dt_inc, e.dt_alt, e.id_cliente, e.nm_cliente, e.id_agenda, e.dt_visita, e.dt_visitafrotista, e.id_agente, e.id_empresa, e.ic_centralleads
  • Sort Method: external merge Disk: 1,632,952kB
4. 7,359.645 47,249.732 ↓ 2.7 4,273,372 1

Gather (cost=1,427,286.57..2,499,310.77 rows=1,587,977 width=443) (actual time=25,326.917..47,249.732 rows=4,273,372 loops=1)

  • Workers Planned: 4
  • Workers Launched: 4
5. 991.621 39,890.087 ↓ 2.2 854,674 5 / 5

Nested Loop (cost=1,426,286.57..2,339,513.07 rows=396,994 width=443) (actual time=25,094.204..39,890.087 rows=854,674 loops=5)

6. 1,397.836 29,497.045 ↓ 3.7 854,675 5 / 5

Merge Join (cost=1,426,283.98..1,707,265.43 rows=228,332 width=443) (actual time=25,094.141..29,497.045 rows=854,675 loops=5)

  • Merge Cond: (e.id_cliente = c.id_cliente)
7. 4,593.893 26,618.454 ↓ 3.7 854,675 5 / 5

Sort (cost=1,425,969.38..1,429,394.36 rows=228,332 width=443) (actual time=25,092.719..26,618.454 rows=854,675 loops=5)

  • Sort Key: e.id_cliente
  • Sort Method: external merge Disk: 352,424kB
8. 690.005 22,024.561 ↓ 3.7 854,675 5 / 5

Hash Join (cost=1,166,014.32..1,277,064.99 rows=228,332 width=443) (actual time=15,757.647..22,024.561 rows=854,675 loops=5)

  • Hash Cond: (e.cd_usuarioinc = u.nm_login)
9. 1,294.537 21,331.956 ↓ 3.7 854,675 5 / 5

Merge Join (cost=1,165,637.12..1,257,850.40 rows=228,332 width=443) (actual time=15,754.810..21,331.956 rows=854,675 loops=5)

  • Merge Cond: ((e.id_tipoevento = te.id_tipoevento) AND (e.id_empresa = te.id_empresa) AND (e.id_grupoevento = te.id_grupoevento))
10. 10,795.270 19,891.960 ↑ 1.3 854,675 5 / 5

Sort (cost=1,162,257.75..1,178,461.23 rows=1,080,232 width=443) (actual time=15,739.047..19,891.960 rows=854,675 loops=5)

  • Sort Key: e.id_tipoevento, e.id_empresa, e.id_grupoevento
  • Sort Method: external merge Disk: 352,416kB
11. 9,096.690 9,096.690 ↑ 1.3 854,675 5 / 5

Parallel Seq Scan on syo_evento e (cost=0.00..385,135.98 rows=1,080,232 width=443) (actual time=0.027..9,096.690 rows=854,675 loops=5)

  • Filter: ((dt_limite IS NOT NULL) AND ((dt_limite <= '1596250784999'::bigint) OR (dt_proximaacao <= '1596250784999'::bigint)))
  • Rows Removed by Filter: 6,465
12. 142.177 145.459 ↓ 122.5 857,800 5 / 5

Sort (cost=3,379.37..3,484.41 rows=7,003 width=27) (actual time=15.748..145.459 rows=857,800 loops=5)

  • Sort Key: te.id_tipoevento, te.id_empresa, te.id_grupoevento
  • Sort Method: quicksort Memory: 731kB
13. 3.282 3.282 ↑ 1.0 6,924 5 / 5

Index Only Scan using syo_tipoevento_select on syo_tipoevento te (cost=1.70..695.73 rows=7,003 width=27) (actual time=0.118..3.282 rows=6,924 loops=5)

  • Heap Fetches: 683
14. 0.986 2.600 ↑ 1.0 2,136 5 / 5

Hash (cost=215.42..215.42 rows=2,157 width=14) (actual time=2.600..2.600 rows=2,136 loops=5)

  • Buckets: 4,096 Batches: 1 Memory Usage: 129kB
15. 1.614 1.614 ↑ 1.0 2,136 5 / 5

Seq Scan on syo_usuario u (cost=0.00..215.42 rows=2,157 width=14) (actual time=0.035..1.614 rows=2,136 loops=5)

16. 1,480.755 1,480.755 ↑ 1.0 2,338,471 5 / 5

Index Only Scan using pk_syo_cliente on syo_cliente c (cost=2.58..225,714.90 rows=2,338,615 width=8) (actual time=0.266..1,480.755 rows=2,338,471 loops=5)

  • Heap Fetches: 173,150
17. 9,401.421 9,401.421 ↑ 1.0 1 4,273,373 / 5

Index Only Scan using syo_encaminhamento_evento_agenteativo on syo_encaminhamento en (cost=2.59..2.71 rows=1 width=4) (actual time=0.011..0.011 rows=1 loops=4,273,373)

  • Index Cond: (id_evento = e.id_evento)
  • Heap Fetches: 26,705
Planning time : 7.122 ms
Execution time : 69,119.755 ms