Re: Bad performance with cascaded deletes

From: Don Seiler <don(at)seiler(dot)us>
To: Haug Bürger <haug(dot)buerger(at)zalando(dot)de>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Bad performance with cascaded deletes
Date: 2018-06-12 15:48:23
Message-ID: CAHJZqBCvqmq7o3wYOxNdxpn2DG9QxaLe_=JKMwCmq1DQNNAGrA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tue, Jun 12, 2018 at 2:26 AM, Haug Bürger <haug(dot)buerger(at)zalando(dot)de>
wrote:

>
> "availability_cache_ac_session_id_fkey" FOREIGN KEY (ac_session_id)
> REFERENCES zpg_data.session(id) ON DELETE CASCADE
>
>
Do you have an index on availability_cache.ac_session_id? These fields are
not automatically indexed and that can lead to horrible performance on
cascading operations like this.

--
Don Seiler
www.seiler.us

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Don Seiler 2018-06-12 15:51:12 Re: Bad performance with cascaded deletes
Previous Message Ravi Krishna 2018-06-12 15:45:01 PG on AWS RDS and IAM authentication