From: | Sean Chittenden <sean(at)chittenden(dot)org> |
---|---|
To: | Ferdinand Smit <ferdinand(at)telegraafnet(dot)nl> |
Cc: | pgsql-admin(at)postgresql(dot)org |
Subject: | Re: INSERT performace. |
Date: | 2002-01-30 17:56:36 |
Message-ID: | 20020130095636.B47442@ninja1.internal |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2002-01-30 17:58:04 | Re: postgresql under Windows is slow |
Previous Message | Naomi Walker | 2002-01-30 17:31:29 | Re: Backup database through web and php |