pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alvaro Herrera <alvherre@2ndquadrant.com>
To: Craig James <cjames@emolecules.com>
Cc: pgsql-performance@lists.postgresql.org
Subject: Re: Simple DELETE on modest-size table runs 100% CPU forever
Date: Thu, 14 Nov 2019 19:22:58 -0300
Message-ID: <20191114222258.GA23194@alvherre.pgsql> (raw)
In-Reply-To: <CAFwQ8rcV_qsODMuY4C1jpiw+q17VLqnoZ1fmRQVTDSRGaJ5KsA@mail.gmail.com>

On 2019-Nov-14, Craig James wrote:

> I'm completely baffled by this problem: I'm doing a delete that joins three
> modest-sized tables, and it gets completely stuck: 100% CPU use forever.

Do you have any FKs there?  If any delete is cascading, and you don't
have an index on the other side, it'd do tons of seqscans.

-- 
Álvaro Herrera                https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services





view thread (11+ messages)  latest in thread

Message-ID: <20191114222258.GA23194@alvherre.pgsql>
Permalink:  ../20191114222258.GA23194@alvherre.pgsql/
Also on:    postgresql.org/message-id/20191114222258.GA23194@alvherre.pgsql

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: alvherre@2ndquadrant.com, cjames@emolecules.com, pgsql-performance@lists.postgresql.org
  Subject: Re: Simple DELETE on modest-size table runs 100% CPU forever
  In-Reply-To: <20191114222258.GA23194@alvherre.pgsql>

* 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