Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
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

pdxpug by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group