Received: from mail.tgd.net (mail.tgd.net [209.81.25.10]) by postgresql.org (8.11.3/8.11.4) with ESMTP id g0UHugl13324 for ; Wed, 30 Jan 2002 12:56:43 -0500 (EST) (envelope-from sean@mail.tgd.net) Received: by mail.tgd.net (Postfix, from userid 1001) id 47D8B20F05; Wed, 30 Jan 2002 09:56:36 -0800 (PST) Date: Wed, 30 Jan 2002 09:56:36 -0800 From: Sean Chittenden To: Ferdinand Smit Cc: pgsql-admin@postgresql.org Subject: Re: INSERT performace. Message-ID: <20020130095636.B47442@ninja1.internal> References: <00a001c1a6d7$c833c520$7401a8c0@Home> <200201290911.g0T9Bx501235@server9.telegraafnet.nl> <20020129225513.A39839@ninja1.internal> <200201300942.g0U9gm509158@server9.telegraafnet.nl> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: <200201300942.g0U9gm509158@server9.telegraafnet.nl>; from "ferdinand@telegraafnet.nl" on Wed, Jan 30, 2002 at = 10:42:36AM X-PGP-Key: 0x1EDDFAAD X-PGP-Fingerprint: C665 A17F 9A56 286C 5CFB 1DEA 9F4F 5CEF 1EDD FAAD X-Web-Homepage: http://sean.chittenden.org/ X-Archive-Number: 200201/268 X-Sequence-Number: 3149 > > 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