explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Qjgl

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

Nested Loop (cost=9.45..111.40 rows=1 width=89) (actual time=0.232..0.849 rows=4 loops=1)

2. 0.031 0.829 ↓ 4.0 4 1

Nested Loop (cost=9.16..103.09 rows=1 width=82) (actual time=0.220..0.829 rows=4 loops=1)

  • Join Filter: (cid.fk_estado_id = est.id)
  • Rows Removed by Join Filter: 20
3. 0.005 0.774 ↓ 4.0 4 1

Nested Loop (cost=9.16..101.87 rows=1 width=86) (actual time=0.197..0.774 rows=4 loops=1)

4. 0.004 0.757 ↓ 4.0 4 1

Nested Loop (cost=9.02..101.63 rows=1 width=73) (actual time=0.187..0.757 rows=4 loops=1)

5. 0.035 0.729 ↓ 4.0 4 1

Hash Join (cost=8.87..101.45 rows=1 width=60) (actual time=0.168..0.729 rows=4 loops=1)

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

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

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

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

9. 0.007 0.030 ↑ 1.0 1 1

Hash (cost=8.29..8.29 rows=1 width=19) (actual time=0.029..0.030 rows=1 loops=1)

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

Index Scan using idx_cnpj on pessoa_juridica jur (cost=0.28..8.29 rows=1 width=19) (actual time=0.023..0.023 rows=1 loops=1)

  • Index Cond: ((cnpj)::text = 'pzpnd-cnpj'::text)
11. 0.024 0.024 ↑ 1.0 1 4

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

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

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

  • Index Cond: (id = b.fk_cidade_id)
13. 0.024 0.024 ↑ 1.7 6 4

Seq Scan on estado est (cost=0.00..1.10 rows=10 width=4) (actual time=0.006..0.006 rows=6 loops=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)