Re: help required in design of database

From: "Steinar H(dot) Gunderson" <sgunderson(at)bigfoot(dot)com>
To: pgsql-performance(at)postgresql(dot)org
Subject: Re: help required in design of database
Date: 2006-02-10 21:03:19
Message-ID: 20060210210319.GA18407@uio.no
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On Fri, Feb 10, 2006 at 12:20:34PM -0800, david drummard wrote:
> 1) create a new table every time a new feed file comes in. Create table with
> indexes. Use the copy command to dump the data into the table.
> 2) rename the current table to some old table name and rename the new table
> to current table name so that applications can access them directly.

That sounds like a working plan.

> Should i create indexes before or after import ? I need to do this in
> shortest period of time so that the data is always uptodate. Note that
> incremental updates are not possible since almost every row will be changed
> in the new file.

You should create indexes after the import. Remember to pump up your memory
settings (maintenance_work_mem) if you want this to be quick.

/* Steinar */
--
Homepage: http://www.sesse.net/

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Tim Jones 2006-02-10 22:06:35 joining two tables slow due to sequential scan
Previous Message david drummard 2006-02-10 20:20:34 help required in design of database