Re: Building a database from a flat file

From: Markus Schaber <schabi(at)logix-tt(dot)com>
To: "Casey T(dot) Deccio" <ctdecci(at)sandia(dot)gov>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: Building a database from a flat file
Date: 2005-03-03 15:28:39
Message-ID: 42272D27.4030900@logix-tt.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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/

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Christopher Browne 2005-03-03 17:39:13 Re: Postgres performance
Previous Message Christoph Haller 2005-03-03 15:04:26 Re: Performance of Views