explain.depesz.com

PostgreSQL's explain analyze made readable

Result: xk5s

Settings
# exclusive inclusive rows x rows loops node
1. 0.001 8,089.759 ↑ 50.0 1 1

Limit (cost=1.00..4,910.42 rows=50 width=93) (actual time=7,788.500..8,089.759 rows=1 loops=1)

2. 7.088 8,089.758 ↑ 6,047.0 1 1

Nested Loop Semi Join (cost=1.00..593,746.03 rows=6,047 width=93) (actual time=7,788.499..8,089.758 rows=1 loops=1)

3. 8,041.942 8,041.942 ↑ 1.3 13,576 1

Index Scan using pk_requisicao_id on solicitacao this_ (cost=0.43..582,525.66 rows=17,735 width=97) (actual time=6.949..8,041.942 rows=13,576 loops=1)

  • Filter: ((id_agencia = 1) AND (idstatus = 2) AND ((NOT ic_pendente_escolha_aprovador) OR (ic_pendente_escolha_aprovador AND ((idstatus = 2) OR (idstatus = 8)))))
  • Rows Removed by Filter: 7648076
4. 0.002 40.728 ↓ 0.0 0 13,576

Nested Loop (cost=0.56..0.62 rows=1 width=8) (actual time=0.003..0.003 rows=0 loops=13,576)

  • Join Filter: (cel.id = emi.id_celula_atendimento)
5. 13.576 13.576 ↑ 1.0 1 13,576

Index Only Scan using id_idx_pk on celula_atendimento cel (cost=0.28..0.30 rows=1 width=4) (actual time=0.001..0.001 rows=1 loops=13,576)

  • Index Cond: (id = this_.id_celula_atendimento)
  • Heap Fetches: 0
6. 27.150 27.150 ↓ 0.0 0 13,575

Index Only Scan using uk_portal_emissores_agencia_idx on emissores_agencia emi (cost=0.29..0.31 rows=1 width=4) (actual time=0.002..0.002 rows=0 loops=13,575)

  • Index Cond: ((id_celula_atendimento = this_.id_celula_atendimento) AND (idusuariorequisicao = 37497))
  • Heap Fetches: 0
Planning time : 0.772 ms