explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Q2gw

Settings
# exclusive inclusive rows x rows loops node
1. 0.027 8.782 ↓ 0.0 0 1

Sort (cost=13,122.70..13,122.93 rows=93 width=2,779) (actual time=8.782..8.782 rows=0 loops=1)

  • Sort Key: this_.isn_marcacao_situacao, this_.hor_chegada, this_.dsc_nome
  • Sort Method: quicksort Memory: 25kB
2. 0.000 8.755 ↓ 0.0 0 1

Nested Loop Left Join (cost=23.46..13,119.65 rows=93 width=2,779) (actual time=8.755..8.755 rows=0 loops=1)

3. 0.001 8.755 ↓ 0.0 0 1

Nested Loop Left Join (cost=0.84..1,223.30 rows=1 width=1,015) (actual time=8.755..8.755 rows=0 loops=1)

4. 0.001 8.754 ↓ 0.0 0 1

Nested Loop (cost=0.42..1,215.95 rows=1 width=820) (actual time=8.754..8.754 rows=0 loops=1)

  • Join Filter: (this_.isn_marcacao_situacao = marcacaosi3_.isn_marcacao_situacao)
5. 0.000 8.753 ↓ 0.0 0 1

Nested Loop (cost=0.42..1,214.77 rows=1 width=804) (actual time=8.753..8.753 rows=0 loops=1)

6. 8.753 8.753 ↓ 0.0 0 1

Seq Scan on t_escala escalabean2_ (cost=0.00..1,200.35 rows=1 width=74) (actual time=8.753..8.753 rows=0 loops=1)

  • Filter: ((dat_escala < '2020-09-13'::date) AND (dat_escala >= '2020-09-14'::date))
  • Rows Removed by Filter: 40,763
7. 0.000 0.000 ↓ 0.0 0

Index Scan using marcacao_fk1 on t_marcacao this_ (cost=0.42..14.41 rows=1 width=730) (never executed)

  • Index Cond: (isn_escala = escalabean2_.isn_escala)
  • Filter: (isn_usuario_profissional = 62::numeric)
8. 0.000 0.000 ↓ 0.0 0

Seq Scan on t_marcacao_situacao marcacaosi3_ (cost=0.00..1.08 rows=8 width=16) (never executed)

9. 0.000 0.000 ↓ 0.0 0

Index Scan using t_paciente_isn_paciente_idx on t_paciente pacientebe1_ (cost=0.42..7.34 rows=1 width=195) (never executed)

  • Index Cond: (this_.isn_paciente = isn_paciente)
10. 0.000 0.000 ↓ 0.0 0

Hash Right Join (cost=22.61..11,895.54 rows=59 width=1,764) (never executed)

  • Hash Cond: (marcacaobe8_.isn_paciente = listintern4_.isn_paciente)
11. 0.000 0.000 ↓ 0.0 0

Seq Scan on t_marcacao marcacaobe8_ (cost=0.00..10,772.06 rows=293,406 width=730) (never executed)

12. 0.000 0.000 ↓ 0.0 0

Hash (cost=22.53..22.53 rows=7 width=1,034) (never executed)

13. 0.000 0.000 ↓ 0.0 0

Index Scan using internacao_fk5 on t_internacao listintern4_ (cost=0.42..22.53 rows=7 width=1,034) (never executed)

  • Index Cond: (this_.isn_paciente = isn_paciente)
Total runtime : 9.006 ms