Search Postgresql Archives

Re: Populating huge tables each day

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Jun 27, 2005 at 01:05:42PM -0700, Dann Corbit wrote:
> 
> > -----Original Message-----
> > From: Jim C. Nasby [mailto:decibel@xxxxxxxxxxx]
> > Sent: Monday, June 27, 2005 12:58 PM
> > To: Dann Corbit
> > Cc: Ben-Nes Yonatan; pgsql-general@xxxxxxxxxxxxxx
> > Subject: Re:  Populating huge tables each day
> > 
> > On Mon, Jun 27, 2005 at 12:43:57PM -0700, Dann Corbit wrote:
> > > I see a lot of problems with this idea.
> > >
> > > You mention that the database is supposed to be available 24x7.
> > > While you are loading, the database table receiving data will not be
> > > available.  Therefore, you will have to have one server online (with
> > 
> > Why do you think that's the case?
> 
> He's doing a bulk load.  I assume he will have to truncate the table and
> load it with the copy command.

Don't ass-u-me; he said he'd be deleting from the main table, not
truncating.

> Is there an alternative I do not know of that is equally fast?
 
Nope, truncate is undoubtedly faster. But it also means you would have
downtime as you mentioned. If it were me, I'd probably make the
trade-off of using a delete inside a transaction.
-- 
Jim C. Nasby, Database Consultant               decibel@xxxxxxxxxxx 
Give your computer some brain candy! www.distributed.net Team #1828

Windows: "Where do you want to go today?"
Linux: "Where do you want to go tomorrow?"
FreeBSD: "Are you guys coming, or what?"

---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux