explain.depesz.com

PostgreSQL's explain analyze made readable

Result: tgr1

Settings
# exclusive inclusive rows x rows loops node
1. 0.004 0.873 ↓ 4.0 4 1

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

2. 0.004 0.857 ↓ 4.0 4 1

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

3. 0.003 0.837 ↓ 4.0 4 1

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

4. 0.003 0.826 ↓ 4.0 4 1

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

5. 0.039 0.811 ↓ 4.0 4 1

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

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

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

  • Merge Cond: (e.id = en.id)
7. 0.269 0.269 ↑ 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.012..0.269 rows=342 loops=1)

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

9. 0.004 0.121 ↑ 1.0 1 1

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

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

Seq Scan on pessoa_juridica jur (cost=0.00..19.50 rows=1 width=19) (actual time=0.114..0.117 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.008 0.008 ↑ 1.0 1 4

Index Scan using cidade_pkey on cidade cid (cost=0.14..0.24 rows=1 width=21) (actual time=0.002..0.002 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.012 0.012 ↑ 1.0 1 4

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

  • Index Cond: (id = jur.fk_pessoa_id)