explain.depesz.com

PostgreSQL's explain analyze made readable

Result: pDd7

Settings
# exclusive inclusive rows x rows loops node
1. 0.082 8.655 ↑ 1.0 1 1

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

  • Join Filter: (fis.fk_pessoa_id = pes.id)
2. 0.082 0.082 ↑ 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.082..0.082 rows=1 loops=1)

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

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

4. 0.607 6.074 ↑ 1.0 970 1

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

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

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

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

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

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

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

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

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

9. 1.940 1.940 ↑ 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.002..0.002 rows=1 loops=970)

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