From: Daniel Cristian Cruz <danielcristian@gmail.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: Recreate big table
Date: Fri, 9 Feb 2007 17:10:30 -0200
Message-ID: <48d0cacb0702091110m2f512224waf7566891d59c068@mail.gmail.com> (raw)
In-Reply-To: <45CCBC7B.3090004@i-logic.hu>
References: <45CCBC7B.3090004@i-logic.hu>
Gábriel,
You could use table inheritance, like table partitioning is explained in manual:
http://www.postgresql.org/docs/8.2/interactive/ddl-partitioning.html
Kind regards,
Daniel Cristian
On 2/9/07, Gábriel Ákos <akos.gabriel@i-logic.hu> wrote:
> Hi,
>
> We have a quite big table, which is heavily used by our online clients.
> The table has several indexes, but no other relation to other tables.
> We have an import process, which can fill/update this table.
> The full import takes 1 hour, and this is very long.
> We are thinking of doing the full import in another table and then just
> "swapping" the two tables.
> What will happen to our indexes? What will happen to our current
> transactions (only read) ? What will the user see? :)
> Should we recreate the indexes after the swap is done?
>
> Btw is there a good practice doing this kind of work?
>
> Thanks in advance,
> Akos Gabriel
>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: Don't 'kill -9' the postmaster
>
--
Daniel Cristian Cruz
Analista de Sistemas
Especialista postgreSQL e Linux
Instrutor Certificado Mandriva
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-performance@postgresql.org
Cc: danielcristian@gmail.com
Subject: Re: Recreate big table
In-Reply-To: <48d0cacb0702091110m2f512224waf7566891d59c068@mail.gmail.com>
References: <45CCBC7B.3090004@i-logic.hu> <48d0cacb0702091110m2f512224waf7566891d59c068@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