From: Manlio Perillo <manlio_perillo@libero.it>
To: Aaron Bono <postgresql@aranya.com>
Cc: Michael Glaesemann <grzm@seespotcode.net>
Cc: pgsql-sql@postgresql.org
Subject: Re: primary keys as TEXT
Date: Mon, 31 Jul 2006 10:57:43 +0200
Message-ID: <44CDC607.6080006@libero.it> (raw)
In-Reply-To: <bf05e51c0607301328n112e57bfxf0d6e7e7dada2b7d@mail.gmail.com>
References: <44C9CCC8.8020304@libero.it>
<6ACD839C-D68A-4BD1-804F-B9DEACFC2ED1@seespotcode.net>
<44CA6E29.4000201@libero.it>
<bf05e51c0607301328n112e57bfxf0d6e7e7dada2b7d@mail.gmail.com>
Aaron Bono ha scritto:
> On 7/28/06, *Manlio Perillo* <manlio_perillo@libero.it
> <mailto:manlio_perillo@libero.it>> wrote:
>
> Michael Glaesemann ha scritto:
> >
> > On Jul 28, 2006, at 17:37 , Manlio Perillo wrote:
> >
> >> There can be performancs problems in having primary keys of type
> TEXT?
> >> What about having a primary key of 3 columns (all of type TEXT)?
> >
> > What defines a problem in terms of performance is heavily dependent on
> > your particular needs and requirements. What are your
> requirements? What
> > profiling have you done to see where your performance bottlenecks
> may be?
> >
>
> I still don't have done profiling.
>
> Simply in the first version of my schema I used serial keys but the
> result is ugly and it force me to do a lot of joins.
>
>
>
> Ugly? Not sure what you mean by that.
>
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?
> I do understand the problem with so many joins. I use views so that the
> joins are only delt with once (in the database) and then all my
> applications run off the views. That way, the applications use very
> simple queries. The views also allow me to change the table structure
> (column names, more table normalization, etc.) without having to make
> changes to the application.
>
View are a good idea, thanks.
Regards Manlio Perillo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: manlio_perillo@libero.it, postgresql@aranya.com, grzm@seespotcode.net
Subject: Re: primary keys as TEXT
In-Reply-To: <44CDC607.6080006@libero.it>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox