Re: Bad performance with cascaded deletes

From: Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>
To: Haug Bürger <haug(dot)buerger(at)zalando(dot)de>, pgsql-general(at)postgresql(dot)org
Subject: Re: Bad performance with cascaded deletes
Date: 2018-06-12 08:39:46
Message-ID: 1528792786.2729.0.camel@cybertec.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Haug Bürger wrote:
> Delete on zpg_data.session (cost=190.51..4491.20 rows=500 width=46)
> ...
> Planning time: 0.222 ms
> Trigger RI_ConstraintTrigger_a_16481 for constraint
> availability_cache_ac_session_id_fkey: time=350.116 calls=500
>
> For me this reads like the delete takes 0.2ms and the cascaded delete
> takes 350ms.

Could you share the complete plan?

Yours,
Laurenz Albe
--
Cybertec | https://www.cybertec-postgresql.com

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Ravi Krishna 2018-06-12 08:57:34 Re: Semantics around INSERT INTO with SELECT and ORDER BY.
Previous Message Steve Krenzel 2018-06-12 08:39:07 Re: Semantics around INSERT INTO with SELECT and ORDER BY.