X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.130]) by svr1.postgresql.org (Postfix) with ESMTP id 7DCC7D1B501 for ; Sun, 28 Sep 2003 00:26:17 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (neptune.hub.org [64.117.224.130]) (amavisd-new, port 10024) with ESMTP id 33985-07 for ; Sat, 27 Sep 2003 21:26:10 -0300 (ADT) Received: from sss.pgh.pa.us (unknown [192.204.191.242]) by svr1.postgresql.org (Postfix) with ESMTP id 8C02CD1B4FF for ; Sat, 27 Sep 2003 21:26:06 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.10/8.12.10) with ESMTP id h8S0QA6c002126; Sat, 27 Sep 2003 20:26:10 -0400 (EDT) To: "Yusuf W." Cc: pgsql-performance@postgresql.org Subject: Re: Performance: BigInt vs Decimal(19,0) In-reply-to: <20030927235414.54467.qmail@web40405.mail.yahoo.com> References: <20030927235414.54467.qmail@web40405.mail.yahoo.com> Comments: In-reply-to "Yusuf W." message dated "Sat, 27 Sep 2003 16:54:14 -0700" Date: Sat, 27 Sep 2003 20:26:09 -0400 Message-ID: <2125.1064708769@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200309/342 X-Sequence-Number: 3708 "Yusuf W." writes: > For the application that I'm working on, we want to > use data types that are database independent. (most > databases has decimal, but not big int). Most databases have bigint, I think. > Anyhow, we are planning on using decimal(19,0) for our > primary keys instead of a big int, would there be a > performance difference in using a bigint over using decimals? You'll be taking a very large performance hit, for very little benefit that I can see. How hard could it be to change the column declarations if you ever move to a database without bigint? There's not normally much need for apps to be explicitly aware of the column type names. regards, tom lane