From: Steinar H. Gunderson <sgunderson@bigfoot.com>
To: pgsql-performance@postgresql.org
Subject: Re: help required in design of database
Date: Fri, 10 Feb 2006 22:03:19 +0100
Message-ID: <20060210210319.GA18407@uio.no> (raw)
In-Reply-To: <9c89e2490602101220i796e6913pdfa05f40bb894b97@mail.gmail.com>
References: <9c89e2490602101220i796e6913pdfa05f40bb894b97@mail.gmail.com>
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/
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-performance@postgresql.org
Cc: sgunderson@bigfoot.com
Subject: Re: help required in design of database
In-Reply-To: <20060210210319.GA18407@uio.no>
* 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