explain.depesz.com

PostgreSQL's explain analyze made readable

Result: faUg

Settings
# exclusive inclusive rows x rows loops node
1. 0.030 34.207 ↓ 0.0 0 1

Delete on tb_contrato_fatura_resumo (cost=5.56..13.60 rows=1 width=34) (actual time=34.207..34.207 rows=0 loops=1)

2. 0.009 34.177 ↑ 1.0 1 1

Nested Loop (cost=5.56..13.60 rows=1 width=34) (actual time=34.175..34.177 rows=1 loops=1)

3. 0.010 34.147 ↑ 1.0 1 1

HashAggregate (cost=5.27..5.28 rows=1 width=32) (actual time=34.147..34.147 rows=1 loops=1)

  • Group Key: "ANY_subquery".id
4. 0.031 34.137 ↑ 1.0 1 1

Subquery Scan on ANY_subquery (cost=0.00..5.26 rows=1 width=32) (actual time=34.135..34.137 rows=1 loops=1)

5. 0.004 34.106 ↑ 1.0 1 1

Limit (cost=0.00..5.25 rows=1 width=4) (actual time=34.105..34.106 rows=1 loops=1)

6. 34.102 34.102 ↑ 822.0 1 1

Seq Scan on tb_contrato_fatura_resumo tb_contrato_fatura_resumo_1 (cost=0.00..4,319.38 rows=822 width=4) (actual time=34.102..34.102 rows=1 loops=1)

  • Filter: (contrato_fatura_id = 377)
  • Rows Removed by Filter: 57826
7. 0.021 0.021 ↑ 1.0 1 1

Index Scan using tb_contrato_fatura_resumo_pkey on tb_contrato_fatura_resumo (cost=0.29..8.31 rows=1 width=10) (actual time=0.020..0.021 rows=1 loops=1)

  • Index Cond: (id = "ANY_subquery".id)
Planning time : 0.524 ms
Execution time : 1,954.749 ms
Trigger times:
Trigger Name:Total time:Calls:Average time:
for constraint tb_contrato_fatura_desconto_fk 4.502 ms 1 4.502 ms
for constraint tb_contrato_fatura_endereco_fk 1.889 ms 1 1.889 ms
for constraint tb_contrato_fatura_servico_fk 270.272 ms 1 270.272 ms
for constraint tb_contrato_fatura_bilhetacao_fk 1,643.753 ms 1 1,643.753 ms