Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id 2390F133740B for ; Mon, 14 Feb 2011 08:30:16 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 90275-03 for ; Mon, 14 Feb 2011 12:30:10 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from exprod7og109.obsmtp.com (exprod7og109.obsmtp.com [64.18.2.171]) by mail.postgresql.org (Postfix) with ESMTP id E75A01336971 for ; Mon, 14 Feb 2011 08:30:07 -0400 (AST) Received: from source ([209.85.161.53]) (using TLSv1) by exprod7ob109.postini.com ([64.18.6.12]) with SMTP ID DSNKTVkgTwwmj0tcf9Ku5tuIAJ3OIaXI7/y9@postini.com; Mon, 14 Feb 2011 04:30:08 PST Received: by mail-fx0-f53.google.com with SMTP id 11so5747511fxm.40 for ; Mon, 14 Feb 2011 04:30:07 -0800 (PST) Received: by 10.223.107.66 with SMTP id a2mr4443497fap.92.1297686607622; Mon, 14 Feb 2011 04:30:07 -0800 (PST) Received: from [192.168.1.183] (dsl-hkibrasgw2-ff7ac300-240.dhcp.inet.fi [88.195.122.240]) by mx.google.com with ESMTPS id n3sm1017531faa.29.2011.02.14.04.30.05 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 14 Feb 2011 04:30:05 -0800 (PST) Message-ID: <4D59204B.9010300@enterprisedb.com> Date: Mon, 14 Feb 2011 14:30:03 +0200 From: Heikki Linnakangas User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; fi-FI; rv:1.9.1.16) Gecko/20101226 Icedove/3.0.11 MIME-Version: 1.0 To: dba CC: pgsql-performance@postgresql.org Subject: Re: Field wise checking the performance. References: <1297685187135-3384348.post@n5.nabble.com> In-Reply-To: <1297685187135-3384348.post@n5.nabble.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-4.2 tagged_above=-10 required=5 tests=BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3 X-Spam-Level: X-Archive-Number: 201102/383 X-Sequence-Number: 42521 On 14.02.2011 14:06, dba wrote: > I have two identical tables. But the with of the fields are different. Need > to know whether changing from varchar(100) to varchar(30) will increase the > performance, or its just the memory access. It will make no difference. The max length is just a constraint on what values can be stored, it doesn't affect how the strings are stored. In both cases, the strings are stored in a variable-length format. -- Heikki Linnakangas EnterpriseDB http://www.enterprisedb.com