Received: from localhost (maia-1.hub.org [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id 916C09FBF1B for ; Thu, 17 May 2007 12:52: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 93692-08 for ; Thu, 17 May 2007 12:52:26 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.4 Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.170]) by postgresql.org (Postfix) with ESMTP id 524DB9FBEE2 for ; Thu, 17 May 2007 12:52:26 -0300 (ADT) Received: by ug-out-1314.google.com with SMTP id k3so296312ugf for ; Thu, 17 May 2007 08:52:25 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:user-agent:mime-version:to:cc:subject:references:in-reply-to:content-type:content-transfer-encoding:sender; b=kKs9flt/mPCjah/Dn25ap/KFg6vc8Q/4qbrRQ9IarbeE0+I/rt7g8ynDRIefDJv3Jfg2UfJEQ7VMnyO9S8F84+W+2wgNi6eNpHinh3HuYuDUQkEa99ldXDJM0Nc4xtUIDxahSFYBYZaZAacp/aaL0PAWmZvJ8/X8dPapYv5UYYc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:user-agent:mime-version:to:cc:subject:references:in-reply-to:content-type:content-transfer-encoding:sender; b=RzGcMr3GHj47AyNjDyjaQD1wDCPMdF6RMWu2m2HaPRlBSmfv7Pwl58GdbogYxoVMk0TDm68zPS9WC252kOHT607qgF6TXQ7PQkhTjsTOtFBg7s4qqEUaaOFAozlgvFxBYqTkwXiZ9tbbLRxaJi2T2sq369y3AU+B9x1Y2RBsEro= Received: by 10.67.10.12 with SMTP id n12mr377961ugi.1179417144783; Thu, 17 May 2007 08:52:24 -0700 (PDT) Received: from ?172.24.32.125? ( [62.232.55.118]) by mx.google.com with ESMTP id q1sm702444uge.2007.05.17.08.52.19; Thu, 17 May 2007 08:52:20 -0700 (PDT) Message-ID: <464C7A2B.5030105@enterprisedb.com> Date: Thu, 17 May 2007 16:52:11 +0100 From: Heikki Linnakangas User-Agent: Icedove 1.5.0.10 (X11/20070329) MIME-Version: 1.0 To: kadams@mxlogic.com CC: pgsql-performance@postgresql.org Subject: Re: WAL log performance/efficiency question References: <1179410671.26604.3.camel@MXLRMT-208.corp.mxlogic.com> <464C6544.9070104@enterprisedb.com> <1179416083.26604.15.camel@MXLRMT-208.corp.mxlogic.com> In-Reply-To: <1179416083.26604.15.camel@MXLRMT-208.corp.mxlogic.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200705/302 X-Sequence-Number: 24692 Keaton Adams wrote: > So for every data page there is a 20 byte header, for every row there is > a 4 byte identifier (offset into the page), AND there is also a 28 byte > fixed-size header (27 + optional null bitmap)?? (I did find the section > in the 8.1 manual that give the physical page layout.) The other RDBMS > platforms I have worked with have a header in the 28 byte range and a > row pointer of 4 bytes, and that's it. I find it a bit surprising that > PostgreSQL would need another 28 bytes per row to track its contents. Yes, it is more than many other DBMSs. It contains mostly MVCC-related visibility information that other DBMSs store at page level etc, or don't have MVCC at all. As Tom mentioned, that's going to be a bit better in 8.3. We reduced the header size from 27 + null bitmap to 23 + null bitmap, which makes a big difference especially on 64-bit architectures, where the header used to be padded up to 32 bytes, and now it's only 24 bytes. For character fields, including CHAR(100) like you have, we also store a 4 bytes length header per field. That's been reduced to 1 byte for string shorter than 127 bytes in 8.3. -- Heikki Linnakangas EnterpriseDB http://www.enterprisedb.com