X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 82307DA3AF for ; Sat, 15 Oct 2005 20:08:08 -0300 (ADT) 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 03361-10 for ; Sat, 15 Oct 2005 23:08:00 +0000 (GMT) Received: from wproxy.gmail.com (wproxy.gmail.com [64.233.184.203]) by svr1.postgresql.org (Postfix) with ESMTP id 52869DA3DC for ; Sat, 15 Oct 2005 20:08:02 -0300 (ADT) Received: by wproxy.gmail.com with SMTP id i5so362778wra for ; Sat, 15 Oct 2005 16:08:05 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=OtaS2ZrIWJpIOEaD14LueocSDhm6b1+o6npKqEsICN3nQ5ckrmP0YzS66HIaKef+0NwU99w+Qmxxz07wIE+pfa+h204+t4g3qffPShuYXUN763HXcXx0kcJ5DOD7/XChSZzetMn5bF71gsn+dhmLzvDma5a8DqSi9TbeBukyEAE= Received: by 10.54.125.19 with SMTP id x19mr342039wrc; Sat, 15 Oct 2005 16:08:05 -0700 (PDT) Received: by 10.54.105.6 with HTTP; Sat, 15 Oct 2005 16:08:04 -0700 (PDT) Message-ID: <3fccaa690510151608t548547bcg56e2d1927689de03@mail.gmail.com> Date: Sat, 15 Oct 2005 17:08:04 -0600 From: Andres Olarte To: pgsql-jdbc@postgresql.org Subject: How to bulk load a schema using JDBC multiple times? MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.263 required=5 tests=[AWL=0.239, RCVD_BY_IP=0.024] X-Spam-Level: X-Archive-Number: 200510/68 X-Sequence-Number: 13999 Hi, I need to load and drop my schema multiple times during my unit tests. This happens several thousand times per run of my test suite. I'm loading the schema from the file that's generated by pg_dump, and it works, but it's SLOW. My tests are taking more than 10 minutes now, and most of the time is spent loading the schema. If there away to do this faster? May be using a store procedure with the whole schema? I've tried making such a procedure, but it doesn't work do to quoting problems. Anybody have any ideas? Thanks Andres