Re: Simple DELETE on modest-size table runs 100% CPU forever

From: Michael Lewis <mlewis(at)entrata(dot)com>
To: Craig James <cjames(at)emolecules(dot)com>
Cc: pgsql-performance(at)lists(dot)postgresql(dot)org
Subject: Re: Simple DELETE on modest-size table runs 100% CPU forever
Date: 2019-11-14 22:24:47
Message-ID: CAHOFxGp6LW+Eh=kUXKYu6YtL7n6jRB7rs29F7pPhA2VKucxfMw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

> If I leave out the "analyze", here's what I get (note that the
> categories_staging_N table's name changes every time; it's
> created on demand as "create table categories_staging_n(id integer)").
>

How/when are they created? In the same statement? After create, are you
analyzing these tables? If not, the optimizer is blind and may be choosing
a bad plan by chance.

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Justin Pryzby 2019-11-14 22:28:45 Re: Simple DELETE on modest-size table runs 100% CPU forever
Previous Message Alvaro Herrera 2019-11-14 22:22:58 Re: Simple DELETE on modest-size table runs 100% CPU forever