Skip site navigation (1) Skip section navigation (2)

Re: Load experimentation

From: Dimitri Fontaine <dfontaine(at)hi-media(dot)com>
To: Ben Brehmer <benbrehmer(at)gmail(dot)com>
Cc: pgsql-performance(at)postgresql(dot)org, Thom Brown <thombrown(at)gmail(dot)com>, Kevin Grittner <Kevin(dot)Grittner(at)wicourts(dot)gov>, craig_james(at)emolecules(dot)com, kbuckham(at)applocation(dot)net, scott(dot)lists(at)enterprisedb(dot)com
Subject: Re: Load experimentation
Date: 2009-12-08 09:08:45
Message-ID: 87ocm9rfxe.fsf@hi-media-techno.com (view raw or flat)
Thread:
Lists: pgsql-performance
Hi,

Ben Brehmer <benbrehmer(at)gmail(dot)com> writes:
> By "Loading data" I am implying: "psql -U postgres -d somedatabase -f sql_file.sql".  The sql_file.sql contains table creates and insert statements. There are no
> indexes present nor created during the load.
>
> OS: x86_64-unknown-linux-gnu, compiled by GCC gcc (GCC) 4.1.2 20080704 (Red Hat 4.1.2-44)
>
> PostgreSQL: I will try upgrading to latest version.
>
> COPY command: Unfortunately I'm stuck with INSERTS due to the nature
> this data was generated (Hadoop/MapReduce).

What I think you could do is the followings:

 - switch to using 8.4
 - load your files in a *local* database
 - pg_dump -Fc
 - now pg_restore -j X on the amazon setup

That way you will be using COPY rather than INSERTs and parallel loading
built-in pg_restore (and optimisations of when to add the indexes and
constraints). The X is to choose depending on the IO power and the
number of CPU...

Regards,
-- 
dim

In response to

Responses

pgsql-performance by date

Next:From: Scott MarloweDate: 2009-12-08 09:28:28
Subject: Re: Load experimentation
Previous:From: Scott MarloweDate: 2009-12-08 07:59:40
Subject: Re: Load experimentation

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group