Received: from localhost (unknown [200.46.204.184]) by developer.postgresql.org (Postfix) with ESMTP id 909DD2E0060 for ; Fri, 11 Apr 2008 09:24:12 -0300 (ADT) Received: from developer.postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-maia, port 10024) with ESMTP id 26506-03 for ; Fri, 11 Apr 2008 09:24:01 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.5 Received: from wf-out-1314.google.com (wf-out-1314.google.com [209.85.200.174]) by developer.postgresql.org (Postfix) with ESMTP id EE1B92E002F for ; Fri, 11 Apr 2008 09:24:07 -0300 (ADT) Received: by wf-out-1314.google.com with SMTP id 28so465276wff.28 for ; Fri, 11 Apr 2008 05:24:06 -0700 (PDT) Received: by 10.142.143.7 with SMTP id q7mr711146wfd.3.1207890815964; Thu, 10 Apr 2008 22:13:35 -0700 (PDT) Received: from ?10.1.1.5? ( [203.206.174.100]) by mx.google.com with ESMTPS id 22sm4569695wfi.12.2008.04.10.22.13.33 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 10 Apr 2008 22:13:35 -0700 (PDT) Message-ID: <47FEF306.5090502@gmail.com> Date: Fri, 11 Apr 2008 15:11:34 +1000 From: Chris User-Agent: Thunderbird 2.0.0.12 (Windows/20080213) MIME-Version: 1.0 To: Jon Stewart CC: pgsql-performance@postgresql.org Subject: Re: Creating large database of MD5 hash values References: 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-Archive-Number: 200804/150 X-Sequence-Number: 29643 > 1. Which datatype should I use to represent the hash value? UUIDs are > also 16 bytes... md5's are always 32 characters long so probably varchar(32). > 2. Does it make sense to denormalize the hash set relationships? The general rule is normalize as much as possible then only denormalize when absolutely necessary. > 3. Should I index? What sort of queries are you going to be running? > 4. What other data structure options would it make sense for me to choose? What sort of other data will you be needing to store? -- Postgresql & php tutorials http://www.designmagick.com/