explain.depesz.com

PostgreSQL's explain analyze made readable

Result: sAyT

Settings
# exclusive inclusive rows x rows loops node
1. 0.081 7,937.554 ↓ 1.0 327 1

Unique (cost=112,801.55..112,803.97 rows=322 width=12) (actual time=7,937.445..7,937.554 rows=327 loops=1)

2. 0.615 7,937.473 ↓ 1.0 327 1

Sort (cost=112,801.55..112,802.36 rows=322 width=12) (actual time=7,937.444..7,937.473 rows=327 loops=1)

  • Sort Key: (count(((ger_emails_consulta.ema_con_json -> 'status'::text) ->> 'data_envio'::text))), arq_rem_consumidores.cod_arq_rem_arquivo
  • Sort Method: quicksort Memory: 40kB
3. 364.469 7,936.858 ↓ 1.0 327 1

GroupAggregate (cost=112,741.65..112,788.14 rows=322 width=12) (actual time=7,261.273..7,936.858 rows=327 loops=1)

  • Group Key: arq_rem_consumidores.cod_arq_rem_arquivo
4. 1,445.898 7,572.389 ↓ 175.7 608,133 1

Sort (cost=112,741.65..112,750.30 rows=3,462 width=314) (actual time=7,260.372..7,572.389 rows=608,133 loops=1)

  • Sort Key: arq_rem_consumidores.cod_arq_rem_arquivo
  • Sort Method: external merge Disk: 168504kB
5. 390.330 6,126.491 ↓ 175.7 608,133 1

Nested Loop (cost=0.85..112,538.13 rows=3,462 width=314) (actual time=0.068..6,126.491 rows=608,133 loops=1)

6. 210.153 3,911.762 ↓ 175.7 608,133 1

Nested Loop (cost=0.42..110,207.03 rows=3,462 width=314) (actual time=0.059..3,911.762 rows=608,133 loops=1)

7. 1,269.077 1,269.077 ↓ 153.3 608,133 1

Seq Scan on ger_emails_consulta (cost=0.00..85,533.59 rows=3,968 width=314) (actual time=0.033..1,269.077 rows=608,133 loops=1)

  • Filter: ((ema_con_json -> 'erro'::text) = 'false'::jsonb)
  • Rows Removed by Filter: 185373
8. 2,432.532 2,432.532 ↑ 1.0 1 608,133

Index Scan using ger_emails_enviados_pkey on ger_emails_enviados (cost=0.42..6.21 rows=1 width=8) (actual time=0.004..0.004 rows=1 loops=608,133)

  • Index Cond: (ema_env_codigo = ger_emails_consulta.cod_ger_emails_enviados)
  • Filter: ((ema_env_provider)::text = 'bry'::text)
9. 1,824.399 1,824.399 ↑ 1.0 1 608,133

Index Scan using arq_rem_consumidores_pkey on arq_rem_consumidores (cost=0.42..0.66 rows=1 width=8) (actual time=0.003..0.003 rows=1 loops=608,133)

  • Index Cond: (rem_com_codigo = ger_emails_enviados.cod_arq_rem_consumidores)
Planning time : 0.872 ms
Execution time : 7,986.217 ms