Re: Building a database from a flat file - Mailing list pgsql-sql

From Markus Schaber
Subject Re: Building a database from a flat file
Date
Msg-id 42272D27.4030900@logix-tt.com
Whole thread Raw
In response to Building a database from a flat file  ("Casey T. Deccio" <ctdecci@sandia.gov>)
Responses Re: Building a database from a flat file
List pgsql-sql
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/


pgsql-sql by date:

Previous
From: Christoph Haller
Date:
Subject: Re: Performance of Views
Next
From: Christopher Browne
Date:
Subject: Re: Postgres performance