Re: EXPLAIN (no ANALYZE) taking an hour for INSERT FROM SELECT - Mailing list pgsql-performance

From Jim Nasby
Subject Re: EXPLAIN (no ANALYZE) taking an hour for INSERT FROM SELECT
Date
Msg-id 55072DE6.1070005@BlueTreble.com
Whole thread Raw
In response to Re: EXPLAIN (no ANALYZE) taking an hour for INSERT FROM SELECT  (Gunnlaugur Thor Briem <gunnlaugur@gmail.com>)
Responses Re: EXPLAIN (no ANALYZE) taking an hour for INSERT FROM SELECT  (Gunnlaugur Thor Briem <gunnlaugur@gmail.com>)
List pgsql-performance
On 3/11/15 10:54 AM, Gunnlaugur Thor Briem wrote:
> (Even better, just make the new table not temporary, and have it replace
> the former table altogether. But that's for later; requires some broader
> changes in our application.)

The other thing you should consider is using TRUNCATE instead of an
un-filtered DELETE. It will both be much faster to perform and won't
leave any dead rows behind.
--
Jim Nasby, Data Architect, Blue Treble Consulting
Data in Trouble? Get it in Treble! http://BlueTreble.com


pgsql-performance by date:

Previous
From: Jim Nasby
Date:
Subject: Re: EXPLAIN (no ANALYZE) taking an hour for INSERT FROM SELECT
Next
From: Joao Junior
Date:
Subject: Re: MusicBrainz postgres performance issues