pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Laurenz Albe <laurenz.albe@cybertec.at>
To: Haug Bürger <haug.buerger@zalando.de>
To: pgsql-general@postgresql.org
Subject: Re: Bad performance with cascaded deletes
Date: Tue, 12 Jun 2018 10:39:46 +0200
Message-ID: <1528792786.2729.0.camel@cybertec.at> (raw)
In-Reply-To: <5a4cfb77-6095-5230-8019-49f99c9ecefa@zalando.de>
References: <5a4cfb77-6095-5230-8019-49f99c9ecefa@zalando.de>

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




view thread (4+ messages)  latest in thread

Message-ID: <1528792786.2729.0.camel@cybertec.at>
Permalink:  ../1528792786.2729.0.camel@cybertec.at/
Also on:    postgresql.org/message-id/1528792786.2729.0.camel@cybertec.at

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: laurenz.albe@cybertec.at, haug.buerger@zalando.de
  Subject: Re: Bad performance with cascaded deletes
  In-Reply-To: <1528792786.2729.0.camel@cybertec.at>
  References: <5a4cfb77-6095-5230-8019-49f99c9ecefa@zalando.de> <1528792786.2729.0.camel@cybertec.at>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox