pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Sean Chittenden <sean@chittenden.org>
To: Ferdinand Smit <ferdinand@telegraafnet.nl>
Cc: pgsql-admin@postgresql.org
Subject: Re: INSERT performace.
Date: Wed, 30 Jan 2002 09:56:36 -0800
Message-ID: <20020130095636.B47442@ninja1.internal> (raw)
In-Reply-To: <200201300942.g0U9gm509158@server9.telegraafnet.nl>
References: <00a001c1a6d7$c833c520$7401a8c0@Home>
	<200201290911.g0T9Bx501235@server9.telegraafnet.nl>
	<20020129225513.A39839@ninja1.internal>
	<200201300942.g0U9gm509158@server9.telegraafnet.nl>

> > How were you inserting the data?  Were you doing multiple inserts per
> > transactions?  Copy?  That sounds really slow to me.
> 
> The database mainly contains integers, which represent the behavior of 
> internet users on our site, so it's very compact data.
> We used multiple insert with mysql but i did'nt find that option in postgres.

BEGIN;
INSERT INTO table (val1, val2, val3) VALUES (1,2,3);
INSERT INTO table (val1, val2, val3) VALUES (4,5,6);
INSERT INTO table (val1, val2, val3) VALUES (7,8,9);
INSERT INTO table (val1, val2, val3) VALUES (10,11,12);
[...]
COMMIT;

> > > By testing we created a postgres database to on an other server
> > > (same type).  The copy command did'nt work, because of 'strange
> > > characters', so we used normal inserts. It took us 12 hours to
> > > import, and 10 hours to create the indexes.
> >
> > Have you tried to escape the data before you inserted it?  That
> > should've solve things.
> 
> No, how do you do that ?

Do you know what those 'strange characters' are?  -sc

-- 
Sean Chittenden



view thread (12+ messages)

Message-ID: <20020130095636.B47442@ninja1.internal>
Permalink:  ../20020130095636.B47442@ninja1.internal/
Also on:    postgresql.org/message-id/20020130095636.B47442@ninja1.internal

 · 

reply

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: sean@chittenden.org, ferdinand@telegraafnet.nl
  Subject: Re: INSERT performace.
  In-Reply-To: <20020130095636.B47442@ninja1.internal>
  References: <00a001c1a6d7$c833c520$7401a8c0@Home> <200201290911.g0T9Bx501235@server9.telegraafnet.nl> <20020129225513.A39839@ninja1.internal> <200201300942.g0U9gm509158@server9.telegraafnet.nl> <20020130095636.B47442@ninja1.internal>

* 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