Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id 7706D1337BB9 for ; Thu, 27 Jan 2011 11:11:20 -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 10303-02 for ; Thu, 27 Jan 2011 15:11:15 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from hrndva-omtalb.mail.rr.com (hrndva-omtalb.mail.rr.com [71.74.56.122]) by mail.postgresql.org (Postfix) with ESMTP id 0B9661337B7A for ; Thu, 27 Jan 2011 11:11:12 -0400 (AST) X-Authority-Analysis: v=1.1 cv=dquaJDitHqzHCdqWSoZ6IgapSuTzW/4TaRYx9N9k4W8= c=1 sm=0 a=q9myV5d65bkA:10 a=8nJEP1OIZ-IA:10 a=RAii6je2cdnAH6ATCOpc6g==:17 a=_Ixf_7qHAAAA:8 a=c81znvj5qdn9aYVnT_0A:9 a=isdUPbATzDLUcrTz6EdTSNQBl00A:4 a=wPNLvfGTeEIA:10 a=ryAo9hy1-OkA:10 a=6vsjEBoLwlAA:10 a=0tfO7MgyNwYA:10 a=RAii6je2cdnAH6ATCOpc6g==:117 X-Cloudmark-Score: 0 X-Originating-IP: 74.73.87.196 Received: from [74.73.87.196] ([74.73.87.196:54786] helo=[192.168.1.103]) by hrndva-oedge01.mail.rr.com (envelope-from ) (ecelerity 2.2.3.46 r()) with ESMTP id FF/D4-14011-01B814D4; Thu, 27 Jan 2011 15:11:13 +0000 Message-ID: <4D418B10.7050008@vmsinfo.com> Date: Thu, 27 Jan 2011 10:11:12 -0500 From: Mladen Gogala User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.2.13) Gecko/20101207 Lightning/1.0b2 Thunderbird/3.1.7 MIME-Version: 1.0 To: "sthomas@peak6.com" CC: Tom Lane , David Greco , "pgsql-performance@postgresql.org" Subject: Re: Real vs Int performance References: <26917.1296079932@sss.pgh.pa.us> <21353.1296137891@sss.pgh.pa.us> <4D418177.1040401@peak6.com> In-Reply-To: <4D418177.1040401@peak6.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=-1.9 tagged_above=-10 required=5 tests=BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001 X-Spam-Level: X-Archive-Number: 201101/267 X-Sequence-Number: 42054 On 1/27/2011 9:30 AM, Shaun Thomas wrote: > I'm not sure about orders of magnitude on the storage/index side, but my > tests gave us a 10% boost if just the keys are switched over to INT or > BIGINT. Well, it depends on what you're doing. Searching by an integer vs. searching by a text string will probably not make much of a difference. However, if you are calculating sums or averages, there will be a huge difference. -- Mladen Gogala Sr. Oracle DBA 1500 Broadway New York, NY 10036 (212) 329-5251 www.vmsinfo.com