X-Original-To: pgsql-sql-postgresql.org@postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id AE0A89FB36D for ; Mon, 31 Jul 2006 16:35:01 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 21211-09 for ; Mon, 31 Jul 2006 16:34:51 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey- Received: from wx-out-0102.google.com (wx-out-0102.google.com [66.249.82.193]) by postgresql.org (Postfix) with ESMTP id 2430A9FB359 for ; Mon, 31 Jul 2006 16:34:50 -0300 (ADT) Received: by wx-out-0102.google.com with SMTP id t13so339413wxc for ; Mon, 31 Jul 2006 12:34:50 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version:content-type:references:x-google-sender-auth; b=UszoroYU3LrvaefjpV9ALsFsHAtJdKqbkQWAQ/HwcVZXlRbfHRchJwZCkf44XUhKXgjjDAvdfnZpHwUmRIHvSA0VB29q0b7MLLKuPSRggKZj3WNkRG1KFZ9bXv1c7Ojp0V5oZ/zVs8NlXnbCSKt0pmZk9MNCCp3e2NG2h/g5Q4I= Received: by 10.78.142.14 with SMTP id p14mr654325hud; Mon, 31 Jul 2006 12:34:49 -0700 (PDT) Received: by 10.78.32.10 with HTTP; Mon, 31 Jul 2006 12:34:49 -0700 (PDT) Message-ID: Date: Mon, 31 Jul 2006 14:34:49 -0500 From: "Aaron Bono" To: "Manlio Perillo" Subject: Re: primary keys as TEXT Cc: "Michael Glaesemann" , pgsql-sql@postgresql.org In-Reply-To: <44CDC607.6080006@libero.it> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_53475_20831923.1154374489465" References: <44C9CCC8.8020304@libero.it> <6ACD839C-D68A-4BD1-804F-B9DEACFC2ED1@seespotcode.net> <44CA6E29.4000201@libero.it> <44CDC607.6080006@libero.it> X-Google-Sender-Auth: e3032f0d7905fd6b X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.574 tagged_above=0 required=5 tests=DNS_FROM_RFC_ABUSE, HTML_30_40, HTML_MESSAGE, SPF_PASS X-Spam-Level: X-Archive-Number: 200607/383 X-Sequence-Number: 25957 ------=_Part_53475_20831923.1154374489465 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline On 7/31/06, Manlio Perillo wrote: > > > Because serial ids are only surrogate keys. > My tables have well definited primary keys, the only problem is that > they are of type TEXT (and spawn up to 3 columns). > > My concern is: how bad can be performance? My guess is that the performance difference is not going to be noticable unless you are dealing with huge amounts of data and even then may account for such a small hit that there will be other issues that are more pressing like writing better queries, creating a data warehouse or adding proper indexes and keeping the indexes well maintained. Anyone care to disagree? ================================================================== Aaron Bono Aranya Software Technologies, Inc. http://www.aranya.com ================================================================== ------=_Part_53475_20831923.1154374489465 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline On 7/31/06, Manlio Perillo <manlio_perillo@libero.it> wrote:

Because serial ids are only surrogate keys.
My tables have well definited primary keys, the only problem is that
they are of type TEXT (and spawn up to 3 columns).

My concern is: how bad can be performance?

 
My guess is that the performance difference is not going to be noticable unless you are dealing with huge amounts of data and even then may account for such a small hit that there will be other issues that are more pressing like writing better queries, creating a data warehouse or adding proper indexes and keeping the indexes well maintained.

Anyone care to disagree?

==================================================================
   Aaron Bono
   Aranya Software Technologies, Inc.
   http://www.aranya.com
================================================================== ------=_Part_53475_20831923.1154374489465--