Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id D64C2B5DC47 for ; Wed, 3 Aug 2011 12:16:37 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 82211-02-7 for ; Wed, 3 Aug 2011 15:16:31 +0000 (UTC) X-Greylist: delayed 00:05:19.329478 by SQLgrey-1.7.6 Received: from images.kandalaya.org (etc.kandalaya.org [83.143.86.98]) by mail.postgresql.org (Postfix) with ESMTP id 886CFB5DBDB for ; Wed, 3 Aug 2011 12:15:54 -0300 (ADT) Received: from mail.linux-delhi.org (ABTS-North-Dynamic-089.131.163.122.airtelbroadband.in [122.163.131.89] (may be forged)) by images.kandalaya.org (8.14.3/8.14.3/Debian-9) with ESMTP id p73FAPbi029598 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 3 Aug 2011 20:40:28 +0530 Received: from mail.linux-delhi.org (raju@localhost [127.0.0.1]) by mail.linux-delhi.org (8.14.4/8.14.4/Debian-2) with ESMTP id p73FAHZc029457 for ; Wed, 3 Aug 2011 20:40:18 +0530 From: "Raj Mathur (=?utf-8?b?4KSw4KS+4KSc?= =?utf-8?b?IOCkruCkvuCkpeClgeCksA==?=)" Reply-To: raju@linux-delhi.org Organization: Kandalaya To: pgsql-sql@postgresql.org Subject: Generic design: char vs varchar primary keys Date: Wed, 3 Aug 2011 20:40:17 +0530 User-Agent: KMail/1.13.7 (Linux/2.6.38-2-686-bigmem; KDE/4.6.3; i686; ; ) MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Message-Id: <201108032040.17628.raju@linux-delhi.org> X-Virus-Scanned: clamav-milter 0.95.2 at images.kandalaya.org X-Virus-Status: Clean X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-0.001 tagged_above=-5 required=5 tests=BAYES_20=-0.001 X-Spam-Level: X-Archive-Number: 201108/11 X-Sequence-Number: 35679 Hi, Can you point me to any pages that explain the difference between using, say CHAR(8) vs VARCHAR(8) as the primary key for a table? Is there any impact on the database in terms of: - Speed of indexed retrieval - Speed of join from a referencing table - Storage (I presume VARHAR(8) would have a slight edge, in general) - Any other issue Regards, -- Raj -- Raj Mathur raju@kandalaya.org http://kandalaya.org/ GPG: 78D4 FC67 367F 40E2 0DD5 0FEF C968 D0EF CC68 D17F PsyTrance & Chill: http://schizoid.in/ || It is the mind that moves