Received: from localhost.localdomain (postgresql.org [64.49.215.8]) by localhost (Postfix) with ESMTP id C0427476AF9 for ; Fri, 5 Jul 2002 12:32:07 -0400 (EDT) Mailbox-Line: From sthomas@townnews.com Fri Jul 5 12:32:07 2002 Received: from hamster.lee.net (leepcC-029.sub-c.lee.net [208.205.126.29]) by postgresql.org (Postfix) with ESMTP id 25AB5476909 for ; Fri, 5 Jul 2002 11:00:29 -0400 (EDT) Received: from localhost (localhost.localdomain [127.0.0.1]) by hamster.lee.net (8.12.2/8.12.2) with ESMTP id g65F0NTj007641 for ; Fri, 5 Jul 2002 10:00:24 -0500 Date: Fri, 5 Jul 2002 10:00:23 -0500 (CDT) From: Shaun Thomas X-X-Sender: sthomas@hamster.lee.net To: Postgresql Admin Subject: Re: Performance impact of record sizes In-Reply-To: <6353.1025826585@sss.pgh.pa.us> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Spam-Status: No, hits=-2.2 required=5.0 tests=IN_REP_TO,PORN_11 version=2.30 X-Spam-Level: X-Archive-Number: 200207/93 X-Sequence-Number: 4779 On Thu, 4 Jul 2002, Tom Lane wrote: > I can think of very very few applications where CHAR(n) is really a > sensible choice over VARCHAR(n). text hashes such as MD5 and crypt, stock or serial numbers, automotive VIN codes, invoice sequences, emulated bitmasks, etc. Lots of industry-specific things are non-varying sequences of characters. Besides, you don't know true horror until you've seen an amateur set up an entire database using nothing but text columns in all the tables. Sometimes these types convey meaning about the data they contain, too. ^_^ > US state postal codes (CHAR(2)) are an example, but beyond that the > valid use cases are mighty thin on the ground. Don't forget zipcodes. You can get away with a char(9), or a char(5) and an optional char(4) for the postal extension. ^_^ -- +-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-+ | Shaun M. Thomas INN Database Administrator | | Phone: (309) 743-0812 Fax : (309) 743-0830 | | Email: sthomas@townnews.com AIM : trifthen | | Web : www.townnews.com | | | | "Most of our lives are about proving something, either to | | ourselves or to someone else." | | -- Anonymous | +-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-+