explain.depesz.com

PostgreSQL's explain analyze made readable

Result: tGhD

Settings
# exclusive inclusive rows x rows loops node
1. 0.146 15.650 ↑ 1.0 1 1

Nested Loop (cost=597.90..1,538.13 rows=1 width=53) (actual time=10.268..15.650 rows=1 loops=1)

  • Join Filter: (fis.fk_pessoa_id = pes.id)
2. 0.031 0.031 ↑ 1.0 1 1

Index Scan using pessoa_nome_idx on pessoa pes (cost=0.00..8.28 rows=1 width=15) (actual time=0.030..0.031 rows=1 loops=1)

  • Index Cond: ((nome)::text = 'cxxks-nome'::text)
3. 0.769 15.473 ↑ 1.0 970 1

Nested Loop (cost=597.90..1,517.50 rows=987 width=46) (actual time=10.193..15.473 rows=970 loops=1)

4. 1.171 11.794 ↑ 1.0 970 1

Hash Join (cost=597.90..1,051.92 rows=987 width=31) (actual time=10.181..11.794 rows=970 loops=1)

  • Hash Cond: (c.fk_motorista_id = m.id)
5. 0.600 0.868 ↑ 1.0 970 1

Bitmap Heap Scan on cartao c (cost=19.90..449.24 rows=987 width=31) (actual time=0.347..0.868 rows=970 loops=1)

  • Recheck Cond: (validade >= '1990-09-03'::date)
6. 0.268 0.268 ↑ 1.0 970 1

Bitmap Index Scan on cartao_validade_idx (cost=0.00..19.66 rows=987 width=0) (actual time=0.268..0.268 rows=970 loops=1)

  • Index Cond: (validade >= '1990-09-03'::date)
7. 5.465 9.755 ↑ 1.0 20,000 1

Hash (cost=328.00..328.00 rows=20,000 width=8) (actual time=9.755..9.755 rows=20,000 loops=1)

  • Buckets: 2048 Batches: 1 Memory Usage: 625kB
8. 4.290 4.290 ↑ 1.0 20,000 1

Seq Scan on motorista m (cost=0.00..328.00 rows=20,000 width=8) (actual time=0.007..4.290 rows=20,000 loops=1)

9. 2.910 2.910 ↑ 1.0 1 970

Index Scan using pessoa_fisica_pkey on pessoa_fisica fis (cost=0.00..0.46 rows=1 width=23) (actual time=0.003..0.003 rows=1 loops=970)

  • Index Cond: (fis.id = m.fk_pessoa_fisica_id)