pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Markus Schaber <schabi@logix-tt.com>
To: Casey T. Deccio <ctdecci@sandia.gov>
Cc: pgsql-sql@postgresql.org
Subject: Re: Building a database from a flat file
Date: Thu, 03 Mar 2005 16:28:39 +0100
Message-ID: <42272D27.4030900@logix-tt.com> (raw)
In-Reply-To: <1109808921.12430.75.camel@boomerang.ran.sandia.gov>
References: <1109808921.12430.75.camel@boomerang.ran.sandia.gov>

Hi, Casey,

Casey T. Deccio schrieb:

> There is more than one problem with this, but the largest is that I
> would like to perform this whole database rebuild within one
> transaction, so other processes that need to access the database can do
> so without noticing the disturbance.  However, performing this set of
> events (besides populating the temporary table) within a single
> transaction takes a long time--over an hour in some cases.
> 
> What are some suggestions to help improve performance with replacing one
> set of data in a schema with another?

- Create the new date in another schema, and then simply rename those
two schemas for "switch over"

- Create the new data in differently named tables, and then simply
rename all the old and new tables for "switch over".

- Have two different set of tables (maybe two identical schemas), and
let your application work on a set of views. Then you can change the
views via "create or replace view" for switch over.

Markus

-- 
Markus Schaber | Dipl. Informatiker | Software Development GIS

Fight against software patents in EU! http://ffii.org/
                                      http://nosoftwarepatents.org/



view thread (11+ messages)  latest in thread

Message-ID: <42272D27.4030900@logix-tt.com>
Permalink:  ../42272D27.4030900@logix-tt.com/
Also on:    postgresql.org/message-id/42272D27.4030900@logix-tt.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-sql@postgresql.org
  Cc: schabi@logix-tt.com, ctdecci@sandia.gov
  Subject: Re: Building a database from a flat file
  In-Reply-To: <42272D27.4030900@logix-tt.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