explain.depesz.com

PostgreSQL's explain analyze made readable

Result: nTdn

Settings
# exclusive inclusive rows x rows loops node
1. 0.002 0.866 ↓ 4.0 4 1

Nested Loop (cost=20.79..121.68 rows=1 width=89) (actual time=0.309..0.866 rows=4 loops=1)

2. 0.001 0.848 ↓ 4.0 4 1

Nested Loop (cost=20.50..113.37 rows=1 width=82) (actual time=0.298..0.848 rows=4 loops=1)

3. 0.003 0.831 ↓ 4.0 4 1

Nested Loop (cost=20.37..113.08 rows=1 width=86) (actual time=0.287..0.831 rows=4 loops=1)

4. 0.004 0.808 ↓ 4.0 4 1

Nested Loop (cost=20.22..112.83 rows=1 width=73) (actual time=0.269..0.808 rows=4 loops=1)

5. 0.036 0.792 ↓ 4.0 4 1

Hash Join (cost=20.08..112.66 rows=1 width=60) (actual time=0.259..0.792 rows=4 loops=1)

  • Hash Cond: (e.fk_pessoa_juridica_id = jur.id)
6. 0.219 0.629 ↑ 1.0 341 1

Merge Join (cost=0.57..92.24 rows=345 width=49) (actual time=0.029..0.629 rows=341 loops=1)

  • Merge Cond: (e.id = en.id)
7. 0.266 0.266 ↑ 101.0 342 1

Index Scan using estacionamento_pkey on estacionamento e (cost=0.29..3,792.29 rows=34,534 width=35) (actual time=0.011..0.266 rows=342 loops=1)

  • Filter: (valorhora > '20'::numeric)
  • Rows Removed by Filter: 659
8. 0.144 0.144 ↑ 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.014..0.144 rows=1,000 loops=1)

9. 0.006 0.127 ↑ 1.0 1 1

Hash (cost=19.50..19.50 rows=1 width=19) (actual time=0.127..0.127 rows=1 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
10. 0.121 0.121 ↑ 1.0 1 1

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

  • Filter: ((cnpj)::text = 'pzpnd-cnpj'::text)
  • Rows Removed by Filter: 999
11. 0.012 0.012 ↑ 1.0 1 4

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

  • Index Cond: (id = en.fk_bairro_id)
12. 0.020 0.020 ↑ 1.0 1 4

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

  • Index Cond: (id = b.fk_cidade_id)
13. 0.016 0.016 ↑ 1.0 1 4

Index Only Scan using estado_pkey on estado est (cost=0.14..0.27 rows=1 width=4) (actual time=0.004..0.004 rows=1 loops=4)

  • Index Cond: (id = cid.fk_estado_id)
  • Heap Fetches: 4
14. 0.016 0.016 ↑ 1.0 1 4

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

  • Index Cond: (id = jur.fk_pessoa_id)