X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (neptune.hub.org [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 2FCD4D1DAA8 for ; Tue, 13 Jan 2004 14:53:20 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 46234-05 for ; Tue, 13 Jan 2004 10:52:52 -0400 (AST) Received: from smtp801.mail.sc5.yahoo.com (smtp801.mail.sc5.yahoo.com [66.163.168.180]) by svr1.postgresql.org (Postfix) with SMTP id B4CB8D1DA95 for ; Tue, 13 Jan 2004 10:52:44 -0400 (AST) Received: from unknown (HELO ANDYXP) (drlaz@sbcglobal.net@64.163.212.139 with login) by smtp801.mail.sc5.yahoo.com with SMTP; 13 Jan 2004 14:52:48 -0000 Message-ID: <013c01c3d9e4$e6d119a0$847ba8c0@ANDYXP> From: "Andrew Lazarus" To: Cc: "Conor Beverland" References: Subject: Re: setArray() Date: Tue, 13 Jan 2004 06:52:44 -0800 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200401/132 X-Sequence-Number: 9089 I have the same issue, but my Array is much smaller. As you see downthread, there is no practical way to use setArray(). As for speed: Are you using a StringBuffer allocated sufficiently large to begin with, not a String? (My last line is return new String(sbuffer); HTH. ----- Original Message ----- From: "Conor Beverland" To: Sent: Monday, January 12, 2004 6:40 AM Subject: [JDBC] setArray() > Hi, > > I'd like to insert a large array of integers into the database (15000) > However I can't seem to get PreparedStatement.setArray() to work. > > I saw a patch in the archives regarding this but I'm not in control of > the java installation which I'm using. > > I'm currently converting my array into a string before inserting it > and using setString()... However this is *very* slow! > > Any advice would be much appreciated, > Conor > > ---------------------------(end of broadcast)--------------------------- > TIP 9: the planner will ignore your desire to choose an index scan if your > joining column's datatypes do not match