explain.depesz.com

PostgreSQL's explain analyze made readable

Result: zH1q

Settings
# exclusive inclusive rows x rows loops node
1. 20.376 3,887.526 ↓ 179.6 97,713 1

Unique (cost=35,901.76..35,904.48 rows=544 width=347) (actual time=3,822.856..3,887.526 rows=97,713 loops=1)

2. 197.795 3,867.150 ↓ 212.1 115,386 1

Sort (cost=35,901.76..35,903.12 rows=544 width=347) (actual time=3,822.854..3,867.150 rows=115,386 loops=1)

  • Sort Key: cons.cod_ger_emails_enviados, cons.ema_con_codigo DESC
  • Sort Method: external merge Disk: 37840kB
3. 119.369 3,669.355 ↓ 212.1 115,386 1

Nested Loop (cost=0.85..35,877.04 rows=544 width=347) (actual time=18.099..3,669.355 rows=115,386 loops=1)

4. 526.102 526.102 ↓ 173.1 755,971 1

Index Scan using teste_consulta_index on ger_emails_consulta cons (cost=0.42..8,057.30 rows=4,367 width=312) (actual time=0.071..526.102 rows=755,971 loops=1)

  • Index Cond: ((cod_ger_fornecedores_email = 2) AND ((ema_con_json ->> 'erro'::text) = 'false'::text))
5. 3,023.884 3,023.884 ↓ 0.0 0 755,971

Index Scan using ger_emails_enviados_pkey on ger_emails_enviados env (cost=0.42..6.36 rows=1 width=35) (actual time=0.004..0.004 rows=0 loops=755,971)

  • Index Cond: (ema_env_codigo = cons.cod_ger_emails_enviados)
  • Filter: (((ema_env_provider)::text = 'bry'::text) AND (ema_env_data_envio >= (now() - '100 days'::interval)))
  • Rows Removed by Filter: 1
Planning time : 1.218 ms
Execution time : 3,906.064 ms