explain.depesz.com

PostgreSQL's explain analyze made readable

Result: LM5g

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 0.000 ↓ 0.0

Aggregate (cost=410,688.65..410,688.66 rows=1 width=0) (actual rows= loops=)

2. 0.000 0.000 ↓ 0.0

Hash Join (cost=241,760.80..410,540.14 rows=59,401 width=0) (actual rows= loops=)

  • Hash Cond: ("NotificacaoUsuario".notificacao_id = "Notificacao".id)
3. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=3,150.86..153,074.96 rows=59,898 width=8) (actual rows= loops=)

  • Hash Cond: ("NotificacaoUsuario".usuario_id = "Usuario".id)
4. 0.000 0.000 ↓ 0.0

Bitmap Heap Scan on chr_notificacao_usuarios "NotificacaoUsuario" (cost=3,142.58..152,243.08 rows=59,898 width=16) (actual rows= loops=)

  • Recheck Cond: (usuario_id = 293::bigint)
  • Filter: ((NOT lido) AND (prodam_cliente_id = 1::bigint) AND (situacao = 1))
5. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on usuario_id (cost=0.00..3,127.61 rows=82,053 width=0) (actual rows= loops=)

  • Index Cond: (usuario_id = 293::bigint)
6. 0.000 0.000 ↓ 0.0

Hash (cost=8.27..8.27 rows=1 width=8) (actual rows= loops=)

7. 0.000 0.000 ↓ 0.0

Index Scan using usuario_pkey on chr_usuarios "Usuario" (cost=0.00..8.27 rows=1 width=8) (actual rows= loops=)

  • Index Cond: (id = 293::bigint)
8. 0.000 0.000 ↓ 0.0

Hash (cost=165,765.73..165,765.73 rows=4,440,017 width=8) (actual rows= loops=)

9. 0.000 0.000 ↓ 0.0

Seq Scan on chr_notificacaos "Notificacao" (cost=0.00..165,765.73 rows=4,440,017 width=8) (actual rows= loops=)

  • Filter: (tipo = 0)