pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Recreate big table
2+ messages / 2 participants
[nested] [flat]

* Recreate big table
@ 2007-02-09 18:24 Gábriel Ákos <akos.gabriel@i-logic.hu>
  2007-02-09 19:10 ` Re: Recreate big table Daniel Cristian Cruz <danielcristian@gmail.com>
  0 siblings, 1 reply; 2+ messages in thread

From: Gábriel Ákos @ 2007-02-09 18:24 UTC (permalink / raw)
  To: pgsql-performance

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



^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: Recreate big table
  2007-02-09 18:24 Recreate big table Gábriel Ákos <akos.gabriel@i-logic.hu>
@ 2007-02-09 19:10 ` Daniel Cristian Cruz <danielcristian@gmail.com>
  0 siblings, 0 replies; 2+ messages in thread

From: Daniel Cristian Cruz @ 2007-02-09 19:10 UTC (permalink / raw)
  To: ; +Cc: pgsql-performance

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



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2007-02-09 19:10 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2007-02-09 18:24 Recreate big table Gábriel Ákos <akos.gabriel@i-logic.hu>
2007-02-09 19:10 ` Daniel Cristian Cruz <danielcristian@gmail.com>

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