pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: David G. Johnston <david.g.johnston@gmail.com>
To: Thomaz Luiz Santos <thomaz.santos@gmail.com>
Cc: pgsql-admin <pgsql-admin@postgresql.org>
Subject: Re: doubts
Date: Wed, 3 Aug 2022 16:12:54 -0700
Message-ID: <CAKFQuwZmnEQWoABFTCZ_NW5eCSdyXEzPAkYd1xSweW8b_e4H8A@mail.gmail.com> (raw)
In-Reply-To: <CAHtRPB6atN3u+dccSOjiJdYpNGEiTJqMrHCpZ4NZc+1F4jEaaw@mail.gmail.com>
References: <CAHtRPB6atN3u+dccSOjiJdYpNGEiTJqMrHCpZ4NZc+1F4jEaaw@mail.gmail.com>

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.

view thread (4+ messages)  latest in thread

Message-ID: <CAKFQuwZmnEQWoABFTCZ_NW5eCSdyXEzPAkYd1xSweW8b_e4H8A@mail.gmail.com>
Permalink:  ../CAKFQuwZmnEQWoABFTCZ_NW5eCSdyXEzPAkYd1xSweW8b_e4H8A@mail.gmail.com/
Also on:    postgresql.org/message-id/CAKFQuwZmnEQWoABFTCZ_NW5eCSdyXEzPAkYd1xSweW8b_e4H8A@mail.gmail.com

 · 

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-admin@postgresql.org
  Cc: david.g.johnston@gmail.com, thomaz.santos@gmail.com
  Subject: Re: doubts
  In-Reply-To: <CAKFQuwZmnEQWoABFTCZ_NW5eCSdyXEzPAkYd1xSweW8b_e4H8A@mail.gmail.com>

* 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