Re: Adding Missing Data to a Table

From: Michael Ewan <michael(dot)ewan(at)intel(dot)com>
To: pdxpug(at)postgresql(dot)org
Subject: Re: Adding Missing Data to a Table
Date: 2011-03-29 20:58:12
Message-ID: 4D9247E4.3060409@intel.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pdxpug

On 03/29/2011 01:53 PM, Rich Shepard wrote:
> On Tue, 29 Mar 2011, wes wrote:
>
>> However, I must ask, out of curiosity: why would you want to index a column
>> whose contents are irrelevant?
> Wes,
>
> Furthermore, I'm a believer in each table having a primary key, especially
> when that table is used in multi-table joins.
>
> Rich
>
Yes, a primary key is good, but how will this table be joined to
others? Will you do something like this?

SELECT foo
FROM bar
JOIN baz ON bar.rowid = baz.barkey;

Indexes on joined columns also serve this purpose.

In response to

Responses

Browse pdxpug by date

  From Date Subject
Next Message Rich Shepard 2011-03-29 21:06:11 Re: Adding Missing Data to a Table
Previous Message Michael Ewan 2011-03-29 20:54:17 Re: Adding Missing Data to a Table