explain.depesz.com

PostgreSQL's explain analyze made readable

Result: bWcB

Settings
# exclusive inclusive rows x rows loops node
1. 0.003 2,569.312 ↓ 0.0 0 1

Update on "mt_transactions_SICAR_b_table" gta (cost=56.59..122,834.16 rows=1 width=1,006) (actual time=2,569.312..2,569.312 rows=0 loops=1)

2. 2,328.713 2,569.309 ↓ 0.0 0 1

Nested Loop (cost=56.59..122,834.16 rows=1 width=1,006) (actual time=2,569.309..2,569.309 rows=0 loops=1)

  • Join Filter: (((gta.sellercar IS NOT NULL) AND ((gta.sellercar)::text = (fromprop.car)::text) AND (gta.cpf_cnpj_origem = fromprop.cpfcnpj)) OR ((gta.sellercar IS NULL) AND (smun.municipio_s = fromprop.municipio) AND (gta.cpf_cnpj_origem = ANY (fromprop.cpfcnpjs)) AND (gta.fazenda_origem_s = ANY (fromprop.fazendas)) AND (gta.proprietario_origem_s = ANY (fromprop.proprietarios))))
  • Rows Removed by Join Filter: 2557395
3. 70.103 70.103 ↑ 1.0 170,493 1

Seq Scan on a_propriedades_unicas fromprop (cost=0.00..5,010.93 rows=170,493 width=233) (actual time=0.026..70.103 rows=170,493 loops=1)

4. 167.711 170.493 ↓ 1.2 15 170,493

Materialize (cost=56.59..183.09 rows=12 width=1,007) (actual time=0.000..0.001 rows=15 loops=170,493)

5. 0.155 2.782 ↓ 1.2 15 1

Hash Join (cost=56.59..183.03 rows=12 width=1,007) (actual time=2.152..2.782 rows=15 loops=1)

  • Hash Cond: (gta.municipio_de_origem = smun.municipio)
6. 0.753 0.753 ↓ 1.2 15 1

Index Scan using idx_mt_transactions_sicar_b_table_scrapeid on "mt_transactions_SICAR_b_table" gta (cost=0.43..126.71 rows=12 width=990) (actual time=0.171..0.753 rows=15 loops=1)

  • Index Cond: (scrapeid = ANY ('{1,2,3,4,5,6,7,8,9,10,11,12,13,14,15}'::integer[]))
  • Filter: ((sellercar IS NOT NULL) OR (sellercar IS NULL))
7. 1.122 1.874 ↑ 1.0 1,918 1

Hash (cost=32.18..32.18 rows=1,918 width=28) (actual time=1.874..1.874 rows=1,918 loops=1)

  • Buckets: 2048 Batches: 1 Memory Usage: 130kB
8. 0.752 0.752 ↑ 1.0 1,918 1

Seq Scan on tmp_a_municipio_unificado smun (cost=0.00..32.18 rows=1,918 width=28) (actual time=0.024..0.752 rows=1,918 loops=1)

Planning time : 4.321 ms