Received: from localhost (wm.hub.org [200.46.204.128]) by postgresql.org (Postfix) with ESMTP id DE4899FB2F6 for ; Wed, 4 Oct 2006 18:46:30 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.128]) (amavisd-new, port 10024) with ESMTP id 86390-06 for ; Wed, 4 Oct 2006 21:46:21 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey- Received: from localhost.localdomain (stark.xeocode.com [216.58.44.227]) by postgresql.org (Postfix) with ESMTP id 766169FA317 for ; Wed, 4 Oct 2006 18:46:20 -0300 (ADT) Received: from localhost ([127.0.0.1] helo=localhost.localdomain) by localhost.localdomain with esmtp (Exim 4.62) (envelope-from ) id 1GVEZG-0007Rs-92; Wed, 04 Oct 2006 17:46:18 -0400 From: Gregory Stark To: "Mark Woodward" Cc: pg@mohawksoft.com, pgsql-hackers@postgresql.org Subject: Re: Netflix Prize data In-Reply-To: <18350.24.91.171.78.1159994622.squirrel@mail.mohawksoft.com> (Mark Woodward's message of "Wed, 4 Oct 2006 16:43:42 -0400 (EDT)") Organization: EnterpriseDB References: <18350.24.91.171.78.1159994622.squirrel@mail.mohawksoft.com> X-Draft-From: ("nnimap+webmail.enterprisedb.com:Inbox" 4624) Date: Wed, 04 Oct 2006 17:46:18 -0400 Message-ID: <87lknv69g5.fsf@enterprisedb.com> User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/22.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.135 tagged_above=0 required=5 tests=FORGED_RCVD_HELO X-Spam-Level: X-Archive-Number: 200610/251 X-Sequence-Number: 92148 "Mark Woodward" writes: > I'm using 8.1.4. The "rdate" field looks something like: "2005-09-06" So, > the raw data is 23 bytes, the date string will probably be rounded up to > 12 bytes, that's 24 bytes per row of data. What is the overhead per > variable? per row? > > Is there any advantage to using "varchar(10)" over "text" ? I'll second the "use a date" comment. But to answer the questions, text and varchar are handled identically in almost every respect. The overhead per variable width field (like text or varchar) is 4 bytes. The overhead per row depends on a few factors, but figure 28 bytes. -- Gregory Stark EnterpriseDB http://www.enterprisedb.com