explain.depesz.com

PostgreSQL's explain analyze made readable

Result: TMSF

Settings
# exclusive inclusive rows x rows loops node
1. 0.037 1.255 ↓ 5.0 5 1

Nested Loop (cost=1.15..104.71 rows=1 width=89) (actual time=0.271..1.255 rows=5 loops=1)

  • Join Filter: (cid.fk_estado_id = est.id)
  • Rows Removed by Join Filter: 26
2. 0.005 1.203 ↓ 5.0 5 1

Nested Loop (cost=1.15..103.48 rows=1 width=93) (actual time=0.258..1.203 rows=5 loops=1)

3. 0.003 1.193 ↓ 5.0 5 1

Nested Loop (cost=1.00..103.24 rows=1 width=80) (actual time=0.255..1.193 rows=5 loops=1)

4. 0.082 1.180 ↓ 5.0 5 1

Merge Join (cost=0.86..103.07 rows=1 width=67) (actual time=0.251..1.180 rows=5 loops=1)

  • Merge Cond: (e.id = en.id)
5. 0.671 0.959 ↑ 16.7 6 1

Nested Loop (cost=0.58..5,070.11 rows=100 width=53) (actual time=0.214..0.959 rows=6 loops=1)

  • Join Filter: (jur.id = e.fk_pessoa_juridica_id)
  • Rows Removed by Join Filter: 1685
6. 0.288 0.288 ↑ 59.1 1,691 1

Index Scan using estacionamento_pkey on estacionamento e (cost=0.29..3,542.29 rows=100,000 width=35) (actual time=0.008..0.288 rows=1,691 loops=1)

7. 0.000 0.000 ↑ 1.0 1 1,691

Materialize (cost=0.29..27.82 rows=1 width=26) (actual time=0.000..0.000 rows=1 loops=1,691)

8. 0.002 0.133 ↑ 1.0 1 1

Nested Loop (cost=0.29..27.81 rows=1 width=26) (actual time=0.131..0.133 rows=1 loops=1)

9. 0.125 0.125 ↑ 1.0 1 1

Seq Scan on pessoa_juridica jur (cost=0.00..19.50 rows=1 width=19) (actual time=0.123..0.125 rows=1 loops=1)

  • Filter: ((cnpj)::text = 'pzpnd-cnpj'::text)
  • Rows Removed by Filter: 999
10. 0.006 0.006 ↑ 1.0 1 1

Index Scan using pessoa_pkey on pessoa pes (cost=0.29..8.31 rows=1 width=15) (actual time=0.006..0.006 rows=1 loops=1)

  • Index Cond: (id = jur.fk_pessoa_id)
11. 0.139 0.139 ↑ 1.0 1,000 1

Index Scan using endereco_pkey on endereco en (cost=0.28..49.27 rows=1,000 width=18) (actual time=0.005..0.139 rows=1,000 loops=1)

12. 0.010 0.010 ↑ 1.0 1 5

Index Scan using bairro_pkey on bairro b (cost=0.14..0.17 rows=1 width=21) (actual time=0.002..0.002 rows=1 loops=5)

  • Index Cond: (id = en.fk_bairro_id)
13. 0.005 0.005 ↑ 1.0 1 5

Index Scan using cidade_pkey on cidade cid (cost=0.14..0.24 rows=1 width=21) (actual time=0.001..0.001 rows=1 loops=5)

  • Index Cond: (id = b.fk_cidade_id)
14. 0.015 0.015 ↑ 1.7 6 5

Seq Scan on estado est (cost=0.00..1.10 rows=10 width=4) (actual time=0.003..0.003 rows=6 loops=5)