Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id 840331337B8E for ; Thu, 28 Oct 2010 12:29:11 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 16014-05 for ; Thu, 28 Oct 2010 15:29:04 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from shrek.krogh.cc (2605ds1-ynoe.0.fullrate.dk [90.184.12.24]) by mail.postgresql.org (Postfix) with ESMTP id B80C91337B71 for ; Thu, 28 Oct 2010 12:28:59 -0300 (ADT) Received: from localhost (localhost [127.0.0.1]) by shrek.krogh.cc (Postfix) with ESMTP id E94EDFF73; Thu, 28 Oct 2010 17:28:57 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at shrek.krogh.cc Received: from shrek.krogh.cc ([127.0.0.1]) by localhost (shrek.krogh.cc [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id GWA1IJD94GDW; Thu, 28 Oct 2010 17:28:54 +0200 (CEST) Received: from [90.184.13.151] (2605ds1-ynoe.2.fullrate.dk [90.184.13.151]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: jesper@krogh.cc) by shrek.krogh.cc (Postfix) with ESMTPSA id DFB5AA8A1; Thu, 28 Oct 2010 17:28:53 +0200 (CEST) Message-ID: <4CC996B5.2050203@krogh.cc> Date: Thu, 28 Oct 2010 17:28:53 +0200 From: Jesper Krogh User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.12) Gecko/20100915 Thunderbird/3.0.8 MIME-Version: 1.0 To: Merlin Moncure CC: Divakar Singh , Robert Haas , Mladen Gogala , pgsql-performance@postgresql.org Subject: Re: Postgres insert performance and storage requirement compared to Oracle References: <402913.53404.qm@web65405.mail.ac4.yahoo.com> <208728.42197.qm@web65409.mail.ac4.yahoo.com> <770715.39613.qm@web29003.mail.ird.yahoo.com> <4CC741FF.8050709@vmsinfo.com> <4CC74E31.6060307@vmsinfo.com> <252538.42200.qm@web65405.mail.ac4.yahoo.com> <173298.80592.qm@web65406.mail.ac4.yahoo.com> <4CC8728B.9050205@krogh.cc> <4CC881CB.8090806@krogh.cc> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.9 tagged_above=-10 required=5 tests=BAYES_00=-1.9 X-Spam-Level: X-Archive-Number: 201010/544 X-Sequence-Number: 40962 On 2010-10-28 15:13, Merlin Moncure wrote: > On Wed, Oct 27, 2010 at 3:47 PM, Jesper Krogh wrote: > >> On 2010-10-27 20:51, Merlin Moncure wrote: >> >> >>>> Yes, I am quite aware of how the o/s page cache works. All else being >>>> equal, I more compact database obviously would be preferred. However >>>> 'all else' is not necessarily equal. I can mount my database on bzip >>>> volume, that must make it faster, right? wrong. I understand the >>>> postgres storage architecture pretty well, and the low hanging fruit >>>> having been grabbed further layout compression is only going to come >>>> as a result of tradeoffs. >>>> >>>> >> Or configureabillity.. Not directly related to overall space consumption >> but I have been working on a patch that would make TOAST* kick in >> earlier in the process, giving a "slimmer" main table with visibillity >> information >> and simple columns and moving larger colums more aggressively to TOAST. >> > Do you have any benchmarks supporting if/when such a change would be beneficial? > > On, IO-bound queries it pretty much translates to the ration between the toast-table-size vs. the main-table-size. Trying to aggressively speed up "select count(*) from table" gives this: http://www.mail-archive.com/pgsql-hackers@postgresql.org/msg146153.html with shutdown of pg and drop caches inbetween... the "default" select count (*) on 50K tuples gives 4.613ms (2 tuples pr page) vs. 318ms... (8 tuples pr page). PG default is inbetween... -- Jesper