pg.ddx.io pgsql-sql@postgresql.org mailing list archivehelp / color / mirror / Atom feed
From: Aaron Bono <postgresql@aranya.com>
To: Manlio Perillo <manlio_perillo@libero.it>
Cc: Michael Glaesemann <grzm@seespotcode.net>
Cc: pgsql-sql@postgresql.org
Subject: Re: primary keys as TEXT
Date: Sun, 30 Jul 2006 15:28:54 -0500
Message-ID: <bf05e51c0607301328n112e57bfxf0d6e7e7dada2b7d@mail.gmail.com> (raw)
In-Reply-To: <44CA6E29.4000201@libero.it>
References: <44C9CCC8.8020304@libero.it>
<6ACD839C-D68A-4BD1-804F-B9DEACFC2ED1@seespotcode.net>
<44CA6E29.4000201@libero.it>
On 7/28/06, Manlio Perillo <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.
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.
I am even getting ready to start using updatable views so my applications
never touch the tables directly - it ads another layer of abstraction
between the tables and the application. But that may be more complicated
than you are ready for - I have yet to decide if it will be worth the effort
but I won't know until I experiment with it more.
==================================================================
Aaron Bono
Aranya Software Technologies, Inc.
http://www.aranya.com
==================================================================
view thread (8+ messages) latest in thread
Message-ID: <bf05e51c0607301328n112e57bfxf0d6e7e7dada2b7d@mail.gmail.com> Permalink: ../bf05e51c0607301328n112e57bfxf0d6e7e7dada2b7d@mail.gmail.com/ Also on: postgresql.org/message-id/bf05e51c0607301328n112e57bfxf0d6e7e7dada2b7d@mail.gmail.com ·
reply
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: postgresql@aranya.com, manlio_perillo@libero.it, grzm@seespotcode.net Subject: Re: primary keys as TEXT In-Reply-To: <bf05e51c0607301328n112e57bfxf0d6e7e7dada2b7d@mail.gmail.com> * 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