Received: from maia.hub.org (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id E6C8063405E for ; Thu, 4 Feb 2010 15:02:05 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 06794-04-2 for ; Thu, 4 Feb 2010 19:01:55 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail.erwied.eu (mail.erwied.eu [85.214.80.157]) by mail.postgresql.org (Postfix) with ESMTP id 29D08633F51 for ; Thu, 4 Feb 2010 15:01:38 -0400 (AST) Received: from dslb-094-220-117-154.pools.arcor-ip.net ([94.220.117.154] helo=erwied.dns2go.com ident=mail) by mail.erwied.eu with esmtpsa (Exim 4.71#1) id 1Nd6xL-0008Nr-4y ; Thu, 04 Feb 2010 20:01:35 +0100 Received: from port-87-234-32-189.static.qsc.de ([87.234.32.189] helo=joe-lifebook.internal) by erwied.dns2go.com with esmtpsa (Exim 4.71#1) id 1Nd6xJ-0005Su-0a ; Thu, 04 Feb 2010 20:01:33 +0100 Date: Thu, 4 Feb 2010 20:01:19 +0100 From: Jochen Erwied Organization: Creative Chaos Computing X-Priority: 3 (Normal) Message-ID: <1163141205.20100204200119@erwied.eu> To: Tory M Blue CC: pgsql-performance@postgresql.org Subject: Re: bigint integers up to 19 digits. In-Reply-To: <8a547c841002041051i53d47fe4pf3a96e22bec85200@mail.gmail.com> References: <8a547c841002041015o57d533fdg7237c50dea7a9278@mail.gmail.com> <4B6B153D.9030200@emolecules.com> <8a547c841002041051i53d47fe4pf3a96e22bec85200@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.001 tagged_above=-10 required=5 tests=BAYES_50=0.001 X-Spam-Level: X-Archive-Number: 201002/92 X-Sequence-Number: 37513 Thursday, February 4, 2010, 7:51:37 PM you wrote: > it is an identifier and is always a number and is used in grouping and > querying. I thought I would lose performance if it is text vs an > integer/double field. Maybe using 'numeric(19)' instead of bigint is an alternative. I actually don't know how these numbers are stored internally (some kind of BCD, or as base-100?), but IMHO they should be faster than strings, although not as fast as 'native' types. --=20 Jochen Erwied | home: jochen@erwied.eu +49-208-38800-18, FAX: -19 Sauerbruchstr. 17 | work: joe@mbs-software.de +49-2151-7294-24, FAX: -50 D-45470 Muelheim | mobile: jochen.erwied@vodafone.de +49-173-5404164