explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Kxah

Settings
# exclusive inclusive rows x rows loops node
1. 0.036 0.160 ↓ 0.0 0 1

Delete on tb_contrato_fatura_resumo (cost=1.76..84.77 rows=10 width=34) (actual time=0.160..0.160 rows=0 loops=1)

2. 0.019 0.124 ↑ 1.0 10 1

Nested Loop (cost=1.76..84.77 rows=10 width=34) (actual time=0.085..0.124 rows=10 loops=1)

3. 0.009 0.075 ↑ 1.0 10 1

HashAggregate (cost=1.47..1.57 rows=10 width=32) (actual time=0.074..0.075 rows=10 loops=1)

  • Group Key: "ANY_subquery".id
4. 0.009 0.066 ↑ 1.0 10 1

Subquery Scan on ANY_subquery (cost=0.29..1.45 rows=10 width=32) (actual time=0.058..0.066 rows=10 loops=1)

5. 0.003 0.057 ↑ 1.0 10 1

Limit (cost=0.29..1.35 rows=10 width=4) (actual time=0.052..0.057 rows=10 loops=1)

6. 0.054 0.054 ↑ 82.2 10 1

Index Scan using tb_contrato_fatura_resumo_idx on tb_contrato_fatura_resumo tb_contrato_fatura_resumo_1 (cost=0.29..86.98 rows=822 width=4) (actual time=0.051..0.054 rows=10 loops=1)

  • Index Cond: (contrato_fatura_id = 377)
7. 0.030 0.030 ↑ 1.0 1 10

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.003..0.003 rows=1 loops=10)

  • Index Cond: (id = "ANY_subquery".id)
Planning time : 0.532 ms
Execution time : 17,819.125 ms
Trigger times:
Trigger Name:Total time:Calls:Average time:
for constraint tb_contrato_fatura_desconto_fk 29.898 ms 10 2.990 ms
for constraint tb_contrato_fatura_endereco_fk 13.208 ms 10 1.321 ms
for constraint tb_contrato_fatura_servico_fk 2,159.434 ms 10 215.943 ms
for constraint tb_contrato_fatura_bilhetacao_fk 15,616.312 ms 10 1,561.631 ms