explain.depesz.com

PostgreSQL's explain analyze made readable

Result: e8ST

Settings
# exclusive inclusive rows x rows loops node
1. 137.246 17,088.254 ↑ 460.6 378,564 1

Unique (cost=324,027,983.08..324,899,902.57 rows=174,383,899 width=76) (actual time=16,611.073..17,088.254 rows=378,564 loops=1)

2. 1,596.285 16,951.008 ↑ 140.6 1,240,422 1

Sort (cost=324,027,983.08..324,463,942.82 rows=174,383,899 width=76) (actual time=16,611.071..16,951.008 rows=1,240,422 loops=1)

  • Sort Key: enrichment_pessoa.rem_com_codigo, (((telefones.value ->> 'ordem'::text))::integer)
  • Sort Method: external merge Disk: 50,896kB
3. 2,246.831 15,354.723 ↑ 140.6 1,240,422 1

Nested Loop (cost=23.01..269,162,814.04 rows=174,383,899 width=76) (actual time=0.700..15,354.723 rows=1,240,422 loops=1)

4. 125.154 10,888.652 ↑ 392.9 443,848 1

Subquery Scan on enrichment_pessoa (cost=23.01..2,791,408.31 rows=174,383,899 width=40) (actual time=0.644..10,888.652 rows=443,848 loops=1)

  • Filter: (enrichment_pessoa.contato IS NOT NULL)
  • Rows Removed by Filter: 22,686
5. 9,848.608 10,763.498 ↑ 375.7 466,534 1

Hash Join (cost=23.01..1,038,806.31 rows=175,260,200 width=40) (actual time=0.643..10,763.498 rows=466,534 loops=1)

  • Hash Cond: (arc.cod_arq_rem_arquivo = arq.rem_arq_codigo)
6. 914.385 914.385 ↓ 1.0 1,754,037 1

Seq Scan on arq_rem_consumidores arc (cost=0.00..129,621.02 rows=1,752,602 width=358) (actual time=0.014..914.385 rows=1,754,037 loops=1)

7. 0.234 0.505 ↑ 1.0 667 1

Hash (cost=14.67..14.67 rows=667 width=4) (actual time=0.505..0.505 rows=667 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 32kB
8. 0.271 0.271 ↑ 1.0 667 1

Seq Scan on arq_rem_arquivo arq (cost=0.00..14.67 rows=667 width=4) (actual time=0.011..0.271 rows=667 loops=1)

9. 2,219.240 2,219.240 ↓ 3.0 3 443,848

Function Scan on jsonb_array_elements telefones (cost=0.01..1.50 rows=1 width=32) (actual time=0.004..0.005 rows=3 loops=443,848)

  • Filter: ((value ->> 'tipoTelefone'::text) = 'Celular'::text)
  • Rows Removed by Filter: 2
Planning time : 0.503 ms
Execution time : 17,133.572 ms