Re: INSERT performace. - Mailing list pgsql-admin

From Sean Chittenden
Subject Re: INSERT performace.
Date
Msg-id 20020130095636.B47442@ninja1.internal
Whole thread Raw
In response to Re: INSERT performace.  (Ferdinand Smit <ferdinand@telegraafnet.nl>)
List pgsql-admin
> > 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

pgsql-admin by date:

Previous
From: Tom Lane
Date:
Subject: Re: postgresql under Windows is slow
Next
From: Stephan Szabo
Date:
Subject: Re: Listing Triggers