Re: Simple DELETE on modest-size table runs 100% CPU forever
Michael Lewis <[email protected]> Thu, 14 Nov 2019 15:24:47 -0700
| Newsgroups | gmane.comp.db.postgresql.performance |
|---|---|
| Message-ID | <CAHOFxGp6LW+Eh=kUXKYu6YtL7n6jRB7rs29F7pPhA2VKucxfMw@mail.gmail.com> |
> 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.