Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id 3DBA6632B8E for ; Fri, 28 May 2010 08:04:30 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 57651-04 for ; Fri, 28 May 2010 11:04:22 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from www64.your-server.de (www64.your-server.de [213.133.104.64]) by mail.postgresql.org (Postfix) with ESMTP id 53D956322C8 for ; Fri, 28 May 2010 08:04:23 -0300 (ADT) Received: from [78.46.5.204] (helo=sslproxy02.your-server.de) by www64.your-server.de with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.69) (envelope-from ) id 1OHxMT-0007Dt-Uq for pgsql-performance@postgresql.org; Fri, 28 May 2010 13:04:21 +0200 Received: from [217.89.104.238] (helo=lisa.local.iathh.de) by sslproxy02.your-server.de with esmtpsa (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.63) (envelope-from ) id 1OHxif-0003LU-WF for pgsql-performance@postgresql.org; Fri, 28 May 2010 13:27:18 +0200 Received: from pc-joachim.ost.iathh.local ([192.168.10.82]) (authenticated user joachim.worringen@iathh.de) by lisa.local.iathh.de (Kerio MailServer 6.7.3 patch 1); Fri, 28 May 2010 13:04:13 +0200 Message-ID: <4BFFA32D.8010009@iathh.de> Date: Fri, 28 May 2010 13:04:13 +0200 From: Joachim Worringen Organization: IAT GmbH User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.8) Gecko/20100301 Fedora/3.0.3-1.fc12 Lightning/1.0b1 Thunderbird/3.0.3 MIME-Version: 1.0 To: pgsql-performance@postgresql.org Subject: Re: performance of temporary vs. regular tables References: <4BFB837C.6010005@iathh.de> <4BFB91A8.20805@iathh.de> <201005251241.59605.andres@anarazel.de> <4BFD4643.9010901@iathh.de> In-Reply-To: <4BFD4643.9010901@iathh.de> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Authenticated-Sender: office@iathh.de X-Virus-Scanned: Clear (ClamAV 0.96/11091/Fri May 28 04:03:27 2010) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.8 tagged_above=-10 required=5 tests=BAYES_50=0.8 X-Spam-Level: X-Archive-Number: 201005/252 X-Sequence-Number: 38836 On 05/26/2010 06:03 PM, Joachim Worringen wrote: > Am 25.05.2010 12:41, schrieb Andres Freund: >> On Tuesday 25 May 2010 11:00:24 Joachim Worringen wrote: >>> Thanks. So, the Write-Ahead-Logging (being used or not) does not matter? >> It does matter quite significantly in my experience. Both from an io >> and a cpu >> overhead perspective. > > O.k., looks as if I have to make my own experience... I'll let you know > if possible. As promised, I did a tiny benchmark - basically, 8 empty tables are filled with 100k rows each within 8 transactions (somewhat typically for my application). The test machine has 4 cores, 64G RAM and RAID1 10k drives for data. # INSERTs into a TEMPORARY table: [joachim@testsrv scaling]$ time pb query -d scaling_qry_1.xml real 3m18.242s user 1m59.074s sys 1m51.001s # INSERTs into a standard table: [joachim@testsrv scaling]$ time pb query -d scaling_qry_1.xml real 3m35.090s user 2m5.295s sys 2m2.307s Thus, there is a slight hit of about 10% (which may even be within meausrement variations) - your milage will vary. Joachim