explain.depesz.com

PostgreSQL's explain analyze made readable

Result: w6nq

Settings
# exclusive inclusive rows x rows loops node
1. 0.062 16.115 ↓ 0.0 0 1

Delete on tb_contrato_fatura_resumo (cost=52.96..135.97 rows=10 width=34) (actual time=16.115..16.115 rows=0 loops=1)

2. 0.018 16.053 ↑ 1.0 10 1

Nested Loop (cost=52.96..135.97 rows=10 width=34) (actual time=16.013..16.053 rows=10 loops=1)

3. 0.010 15.995 ↑ 1.0 10 1

HashAggregate (cost=52.67..52.77 rows=10 width=32) (actual time=15.993..15.995 rows=10 loops=1)

  • Group Key: "ANY_subquery".id
4. 0.019 15.985 ↑ 1.0 10 1

Subquery Scan on ANY_subquery (cost=0.00..52.65 rows=10 width=32) (actual time=15.971..15.985 rows=10 loops=1)

5. 0.003 15.966 ↑ 1.0 10 1

Limit (cost=0.00..52.55 rows=10 width=4) (actual time=15.957..15.966 rows=10 loops=1)

6. 15.963 15.963 ↑ 82.2 10 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=15.956..15.963 rows=10 loops=1)

  • Filter: (contrato_fatura_id = 377)
  • Rows Removed by Filter: 57826
7. 0.040 0.040 ↑ 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.004..0.004 rows=1 loops=10)

  • Index Cond: (id = "ANY_subquery".id)
Planning time : 0.341 ms
Execution time : 18,183.991 ms
Trigger times:
Trigger Name:Total time:Calls:Average time:
for constraint tb_contrato_fatura_desconto_fk 29.533 ms 10 2.953 ms
for constraint tb_contrato_fatura_endereco_fk 13.252 ms 10 1.325 ms
for constraint tb_contrato_fatura_servico_fk 2,191.798 ms 10 219.180 ms
for constraint tb_contrato_fatura_bilhetacao_fk 15,933.179 ms 10 1,593.318 ms