Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id BAEA96341F4 for ; Fri, 28 May 2010 14:08:11 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 16534-03 for ; Fri, 28 May 2010 17:08:04 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-gy0-f174.google.com (mail-gy0-f174.google.com [209.85.160.174]) by mail.postgresql.org (Postfix) with ESMTP id 47000632894 for ; Fri, 28 May 2010 14:08:04 -0300 (ADT) Received: by gyg13 with SMTP id 13so1150657gyg.19 for ; Fri, 28 May 2010 10:08:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:received:in-reply-to :references:from:date:message-id:subject:to:cc:content-type :content-transfer-encoding; bh=mmbNXszPV7Btur3CfbrKshBqNHANyifKtCth1+Ifkr4=; b=dHVGgg8CHArumWzJZkzC0qErZOK+gdcQpd4u+KE7Q4DGme1oHFJqiNmwPiJjJ245Td RCEEARMG8cEDk9EAp2sQgMTIar6qwIrCPvZS2qVsGktSzcxNxXbf22FE6apgZCkybg7q QIh5AZ99TriRJ/HPx8uNjO/0YpHtvJTO9fsqo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; b=x0xeUy6ccv2WcKL4ukxihFZ/046VQbwcOmWhfy3pDmoc5y7LVj/ShyoE/HVcK8sgdA 4iS7/a0S80Hquvfrl6rNqH5MGca0CX37877PI2E1psEWv/ldniiCIt3vtAc02nUwLR1B Pq/2wrGAUrcPqWsBQceVC1l/omxF1qkK+xuis= Received: by 10.229.221.84 with SMTP id ib20mr161922qcb.93.1275066483463; Fri, 28 May 2010 10:08:03 -0700 (PDT) MIME-Version: 1.0 Received: by 10.229.36.144 with HTTP; Fri, 28 May 2010 10:07:42 -0700 (PDT) In-Reply-To: <4BFFA32D.8010009@iathh.de> References: <4BFB837C.6010005@iathh.de> <4BFB91A8.20805@iathh.de> <201005251241.59605.andres@anarazel.de> <4BFD4643.9010901@iathh.de> <4BFFA32D.8010009@iathh.de> From: Rob Wultsch Date: Fri, 28 May 2010 10:07:42 -0700 Message-ID: Subject: Re: performance of temporary vs. regular tables To: Joachim Worringen Cc: pgsql-performance@postgresql.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-0.5 tagged_above=-10 required=5 tests=BAYES_05=-0.5 X-Spam-Level: X-Archive-Number: 201005/254 X-Sequence-Number: 38838 On Fri, May 28, 2010 at 4:04 AM, Joachim Worringen wrote: > 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 matte= r? >>> >>> 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 fille= d > 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 =A0 =A03m18.242s > user =A0 =A01m59.074s > sys =A0 =A0 1m51.001s > > # INSERTs into a standard table: > [joachim@testsrv scaling]$ time pb query -d scaling_qry_1.xml > > real =A0 =A03m35.090s > user =A0 =A02m5.295s > sys =A0 =A0 2m2.307s > > Thus, there is a slight hit of about 10% (which may even be within > meausrement variations) - your milage will vary. > > =A0Joachim > > > -- > Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org= ) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgsql-performance > I think it would be interesting to create a ram disk and insert into it. In the MySQL community even thought MyISAM has fallen out of use the Memory table (based on MyISAM) is still somewhat used. --=20 Rob Wultsch wultsch@gmail.com