Received: from localhost (maia-1.hub.org [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id D04B19FB5CB for ; Sun, 8 Jul 2007 13:25:31 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-maia, port 10024) with ESMTP id 78550-06 for ; Sun, 8 Jul 2007 13:25:28 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.4 Received: from wa-out-1112.google.com (wa-out-1112.google.com [209.85.146.177]) by postgresql.org (Postfix) with ESMTP id 627939FB378 for ; Sun, 8 Jul 2007 13:25:27 -0300 (ADT) Received: by wa-out-1112.google.com with SMTP id k40so1118340wah for ; Sun, 08 Jul 2007 09:25:26 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=BV+8I3eUuzPCfo2RNMcGCFFRvoQ0nhLPvfBSei19TgOHB1f0Gy8+hVN5zANM2TumPmtg3M/No6bFRbyNHfudHJmS9053KaOkqHObL8UqL4h/61qo28u0z1GDYXZNnrPGU+8IfzLTNBPUu+2sxw/+NtQUUsGz8fo/Fq3URjCq3z8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=o9l0S4aUt8hqVv3OxRttM/aIGEFnrwy0ECm3BxuHbBNxaSrEx9TkYwatIfRkHgxYxlxyzIR9XbA9HiFyacM0mG+3UR/+dIZ4RKDtfziPkuJFE3sSlE/yNRPKiwYRX5D75+ZcWMnsAY7OdYR2M/7LC0qQxcLCABc8dYncyNkneu8= Received: by 10.115.55.1 with SMTP id h1mr2351027wak.1183911926464; Sun, 08 Jul 2007 09:25:26 -0700 (PDT) Received: by 10.114.151.9 with HTTP; Sun, 8 Jul 2007 09:25:26 -0700 (PDT) Message-ID: Date: Sun, 8 Jul 2007 19:25:26 +0300 From: "Kalle Hallivuori" To: "Thomas Finneid" Subject: Re: improvement suggestions for performance design Cc: pgsql-performance@postgresql.org In-Reply-To: <4690B725.5070303@ifi.uio.no> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <40362.134.32.140.234.1183637748.squirrel@webmail.uio.no> <468CEB32.30109@enterprisedb.com> <40891.134.32.140.234.1183642557.squirrel@webmail.uio.no> <468D3AF7.4070505@enterprisedb.com> <468D6F68.7090903@ifi.uio.no> <4690B725.5070303@ifi.uio.no> X-Google-Sender-Auth: 30bfe56298352d62 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200707/54 X-Sequence-Number: 25738 Hi. 2007/7/8, Thomas Finneid : > > Kalle Hallivuori wrote: > > > COPY is plentitudes faster than INSERT: > > http://www.postgresql.org/docs/8.1/interactive/sql-copy.html > > > > If you can't just push the data straight into the final table with > > COPY, push it into a temporary table that you go through with the > > database procedure. > > > > Shameless plug: If you use Java and miss COPY functionality in the > > driver, it's available at > > > > http://kato.iki.fi/sw/db/postgresql/jdbc/copy/ > > > > I was able to practically nullify time spent inserting with that. > > Interresting, I will definately have a look at it. > What is the maturity level of the code at this point? and what is > potentially missing to bring it up to production quality? (stability is > of the utmost importance in my usage scenario.) It's my third implementation, based on earlier work by Kris Jurka, a maintainer of the JDBC driver. (It is really quite short so it's easy to keep it clear.) I consider it mature enough to have accommodated it as part of an upcoming large application, but I'd really like to hear others' opinions. Documentation I should add one of these days, maybe even rewrite the javadoc. You can use COPY as is on the server side without the patch, but then you need to get the data as CSV or TSV files onto the database server machine, and use db superuser privileges to import it. My patch just adds the ability to feed data from client with normal user privileges. -- Kalle Hallivuori +358-41-5053073 http://korpiq.iki.fi/