Re: doubts - Mailing list pgsql-admin

From David G. Johnston
Subject Re: doubts
Date
Msg-id CAKFQuwZmnEQWoABFTCZ_NW5eCSdyXEzPAkYd1xSweW8b_e4H8A@mail.gmail.com
Whole thread Raw
In response to doubts  (Thomaz Luiz Santos <thomaz.santos@gmail.com>)
List pgsql-admin
On Wed, Aug 3, 2022 at 4:06 PM Thomaz Luiz Santos <thomaz.santos@gmail.com> wrote:

I need to refresh the data in one table, but I use one truncate to clean the data and insert again the new data, 

I have one question: is it possible to minimize the downtime for this process ( because this table is large. ), using another strategy, like one view and updating the view ? 


Temporary and/or unlogged tables?

Truncate and insert is the fastest you can do if every record has to change.

Otherwise, "maybe" is about the best you should expect if you are going to be that generic and non-specific regarding "process".

David J.

pgsql-admin by date:

Previous
From: Thomaz Luiz Santos
Date:
Subject: doubts
Next
From: Scott Ribe
Date:
Subject: Re: doubts