X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 29B373A3C55 for ; Thu, 11 Nov 2004 08:04:17 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 88366-07 for ; Thu, 11 Nov 2004 08:04:09 +0000 (GMT) Received: from rproxy.gmail.com (rproxy.gmail.com [64.233.170.207]) by svr1.postgresql.org (Postfix) with ESMTP id 543CF3A3AE1 for ; Thu, 11 Nov 2004 08:04:09 +0000 (GMT) Received: by rproxy.gmail.com with SMTP id a36so288553rnf for ; Thu, 11 Nov 2004 00:04:06 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:references; b=pv/Ynpe0EZDuzUnf5j+5uY9EgRQdkQlH33GuCVHYvZllpHanOCXcoF2hG8U5ZmvEQfW2lvjq+ZGgDVJxL3FZPHAawTtPM1UHknKaiJtlbZnkPm3Z4LpBMqJk2q4fPJGYhko8332zBVJt2kS3F990DEOBzTIfqKfbGTF1EoN7sQE= Received: by 10.38.15.8 with SMTP id 8mr1005578rno; Thu, 11 Nov 2004 00:04:06 -0800 (PST) Received: by 10.39.2.50 with HTTP; Thu, 11 Nov 2004 00:04:06 -0800 (PST) Message-ID: <376dd19504111100044aa0ca1e@mail.gmail.com> Date: Thu, 11 Nov 2004 16:04:06 +0800 From: Edwin Eyan Moragas Reply-To: Edwin Eyan Moragas To: mkl@webde-ag.de Subject: Re: How to speed-up inserts with jdbc Cc: Jeff , Shane|SkinnyCorp , pgsql-performance@postgresql.org In-Reply-To: <41921CFD.7060604@webde-ag.de> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit References: <003201c4c68e$8d347ee0$a702a8c0@shanepc> <41921CFD.7060604@webde-ag.de> X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200411/179 X-Sequence-Number: 9133 On Wed, 10 Nov 2004 14:51:57 +0100, Michael Kleiser wrote: > Statement st = con.createStatement(); > java.sql.Timestamp datum = new java.sql.Timestamp(new Date().getTime()); > Date start = new Date(); > System.out.println(start); > for (int i=0; i<100; ++i) { > st.executeUpdate("insert into history(uuid,coni,date,direction,partner,type) values('uuid','content','"+datum+"','dir','partner','type')"); > } how about using PreparedStatment? that's on the java end. on the pg end, maybe do a BEGIN before the for loop and END at the end of the for loop. -- i'm not flying. i'm falling... in style.