explain.depesz.com

PostgreSQL's explain analyze made readable

Result: FMro

Settings
# exclusive inclusive rows x rows loops node
1. 0.032 13.968 ↑ 1.0 1 1

Unique (cost=577,074.34..577,074.34 rows=1 width=1,221) (actual time=13.945..13.968 rows=1 loops=1)

2. 0.049 13.936 ↑ 1.0 1 1

Sort (cost=577,074.34..577,074.34 rows=1 width=1,221) (actual time=13.928..13.936 rows=1 loops=1)

  • Sort Key: e.ema_env_codigo, con.ema_con_codigo
  • Sort Method: quicksort Memory: 26kB
3. 3.917 13.887 ↑ 1.0 1 1

Nested Loop (cost=3.52..577,074.33 rows=1 width=1,221) (actual time=13.484..13.887 rows=1 loops=1)

  • Join Filter: (c.cod_arq_rem_arquivo = a.rem_arq_codigo)
  • Rows Removed by Join Filter: 483
4. 0.041 5.545 ↑ 1.0 1 1

Nested Loop Left Join (cost=3.52..577,057.37 rows=1 width=1,496) (actual time=5.290..5.545 rows=1 loops=1)

  • Join Filter: ("*SELECT* 1".rem_com_codigo = c.rem_com_codigo)
5. 0.045 0.551 ↑ 1.0 1 1

Nested Loop Left Join (cost=2.82..22.78 rows=1 width=1,468) (actual time=0.311..0.551 rows=1 loops=1)

6. 0.046 0.480 ↑ 1.0 1 1

Nested Loop (cost=2.40..22.22 rows=1 width=1,472) (actual time=0.272..0.480 rows=1 loops=1)

7. 0.046 0.414 ↑ 1.0 1 1

Nested Loop (cost=1.97..21.57 rows=1 width=1,164) (actual time=0.237..0.414 rows=1 loops=1)

8. 0.046 0.348 ↑ 1.0 1 1

Nested Loop (cost=1.55..20.92 rows=1 width=1,124) (actual time=0.201..0.348 rows=1 loops=1)

9. 0.045 0.277 ↑ 1.0 1 1

Nested Loop (cost=1.12..20.02 rows=1 width=809) (actual time=0.160..0.277 rows=1 loops=1)

10. 0.067 0.208 ↑ 1.0 1 1

Nested Loop (cost=0.85..19.71 rows=1 width=813) (actual time=0.121..0.208 rows=1 loops=1)

  • Join Filter: (gse.cod_arq_rem_consumidores = c_1.rem_com_codigo)
11. 0.050 0.116 ↑ 1.0 1 1

Nested Loop (cost=0.42..19.05 rows=1 width=805) (actual time=0.078..0.116 rows=1 loops=1)

12. 0.041 0.041 ↑ 1.0 1 1

Seq Scan on ger_sms_enviados gse (cost=0.00..10.60 rows=1 width=556) (actual time=0.033..0.041 rows=1 loops=1)

  • Filter: ((cod_arq_ret_arquivo_leitura IS NULL) AND (sms_env_pagina_track IS NOT NULL))
  • Rows Removed by Filter: 1
13. 0.025 0.025 ↑ 1.0 1 1

Index Scan using ger_emails_enviados_cod_arq_rem_consumidores_idx on ger_emails_enviados e (cost=0.42..8.44 rows=1 width=249) (actual time=0.018..0.025 rows=1 loops=1)

  • Index Cond: (cod_arq_rem_consumidores = gse.cod_arq_rem_consumidores)
14. 0.025 0.025 ↑ 1.0 1 1

Index Scan using arq_rem_consumidores_pkey on arq_rem_consumidores c_1 (cost=0.42..0.65 rows=1 width=8) (actual time=0.016..0.025 rows=1 loops=1)

  • Index Cond: (rem_com_codigo = e.cod_arq_rem_consumidores)
15. 0.024 0.024 ↑ 1.0 1 1

Index Scan using arq_rem_arquivo_pkey on arq_rem_arquivo a_1 (cost=0.27..0.29 rows=1 width=4) (actual time=0.016..0.024 rows=1 loops=1)

  • Index Cond: (rem_arq_codigo = c_1.cod_arq_rem_arquivo)
  • Filter: (rem_arq_status = 'EN'::bpchar)
16. 0.025 0.025 ↑ 1.0 1 1

Index Scan using ger_emails_consulta_cod_ger_emails_enviados_idx on ger_emails_consulta con (cost=0.42..0.89 rows=1 width=315) (actual time=0.017..0.025 rows=1 loops=1)

  • Index Cond: (cod_ger_emails_enviados = e.ema_env_codigo)
17. 0.020 0.020 ↑ 1.0 1 1

Index Scan using arq_rem_consumidores_pkey on arq_rem_consumidores c (cost=0.42..0.64 rows=1 width=40) (actual time=0.012..0.020 rows=1 loops=1)

  • Index Cond: (rem_com_codigo = c_1.rem_com_codigo)
18. 0.020 0.020 ↑ 1.0 1 1

Index Scan using arq_rem_consumidores_pkey on arq_rem_consumidores consumidores (cost=0.42..0.64 rows=1 width=320) (actual time=0.011..0.020 rows=1 loops=1)

  • Index Cond: (rem_com_codigo = c_1.rem_com_codigo)
19. 0.026 0.026 ↑ 1.0 1 1

Index Only Scan using ger_emails_enviados_cod_arq_rem_consumidores_idx on ger_emails_enviados (cost=0.42..0.54 rows=1 width=4) (actual time=0.015..0.026 rows=1 loops=1)

  • Index Cond: (cod_arq_rem_consumidores = consumidores.rem_com_codigo)
  • Heap Fetches: 1
20. 0.025 4.953 ↓ 0.0 0 1

Append (cost=0.70..572,397.89 rows=370,936 width=36) (actual time=4.953..4.953 rows=0 loops=1)

21. 0.019 2.629 ↓ 0.0 0 1

Subquery Scan on *SELECT* 1 (cost=0.70..286,198.95 rows=185,468 width=36) (actual time=2.629..2.629 rows=0 loops=1)

22. 0.019 2.610 ↓ 0.0 0 1

Nested Loop (cost=0.70..284,344.27 rows=185,468 width=40) (actual time=2.610..2.610 rows=0 loops=1)

23. 0.019 2.591 ↓ 0.0 0 1

Subquery Scan on enrichment_empresa (cost=0.70..3,823.91 rows=185,468 width=36) (actual time=2.591..2.591 rows=0 loops=1)

  • Filter: (enrichment_empresa.contato IS NOT NULL)
24. 1.246 2.572 ↓ 0.0 0 1

Nested Loop (cost=0.70..1,959.91 rows=186,400 width=40) (actual time=2.572..2.572 rows=0 loops=1)

25. 0.034 0.034 ↑ 1.0 1 1

Index Scan using arq_rem_arquivo_rem_arq_status_idx on arq_rem_arquivo arq (cost=0.27..4.29 rows=1 width=4) (actual time=0.021..0.034 rows=1 loops=1)

  • Index Cond: (rem_arq_status = 'PR'::bpchar)
26. 1.292 1.292 ↑ 21.7 109 1

Index Scan using arq_rem_consumidores_cod_arq_rem_arquivo_idx on arq_rem_consumidores arc (cost=0.42..990.61 rows=2,369 width=40) (actual time=0.018..1.292 rows=109 loops=1)

  • Index Cond: (cod_arq_rem_arquivo = arq.rem_arq_codigo)
27. 0.000 0.000 ↓ 0.0 0

Function Scan on jsonb_array_elements emails (cost=0.01..1.50 rows=1 width=32) (never executed)

  • Filter: ((value ->> 'ordem'::text) = '1'::text)
28. 0.020 2.299 ↓ 0.0 0 1

Subquery Scan on *SELECT* 2 (cost=0.70..286,198.95 rows=185,468 width=36) (actual time=2.299..2.299 rows=0 loops=1)

29. 0.018 2.279 ↓ 0.0 0 1

Nested Loop (cost=0.70..284,344.27 rows=185,468 width=40) (actual time=2.279..2.279 rows=0 loops=1)

30. 0.019 2.261 ↓ 0.0 0 1

Subquery Scan on enrichment_pessoa (cost=0.70..3,823.91 rows=185,468 width=36) (actual time=2.261..2.261 rows=0 loops=1)

  • Filter: (enrichment_pessoa.contato IS NOT NULL)
31. 1.055 2.242 ↓ 0.0 0 1

Nested Loop (cost=0.70..1,959.91 rows=186,400 width=40) (actual time=2.242..2.242 rows=0 loops=1)

32. 0.046 0.046 ↑ 1.0 1 1

Index Scan using arq_rem_arquivo_rem_arq_status_idx on arq_rem_arquivo arq_1 (cost=0.27..4.29 rows=1 width=4) (actual time=0.036..0.046 rows=1 loops=1)

  • Index Cond: (rem_arq_status = 'PR'::bpchar)
33. 1.141 1.141 ↑ 21.7 109 1

Index Scan using arq_rem_consumidores_cod_arq_rem_arquivo_idx on arq_rem_consumidores arc_1 (cost=0.42..990.61 rows=2,369 width=40) (actual time=0.033..1.141 rows=109 loops=1)

  • Index Cond: (cod_arq_rem_arquivo = arq_1.rem_arq_codigo)
34. 0.000 0.000 ↓ 0.0 0

Function Scan on jsonb_array_elements emails_1 (cost=0.01..1.50 rows=1 width=32) (never executed)

  • Filter: ((value ->> 'ordem'::text) = '1'::text)
35. 4.425 4.425 ↓ 1.0 484 1

Seq Scan on arq_rem_arquivo a (cost=0.00..10.83 rows=483 width=25) (actual time=0.023..4.425 rows=484 loops=1)

Planning time : 15.188 ms
Execution time : 14.387 ms