Re: counting query

From: John Meyer <john(dot)l(dot)meyer(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: counting query
Date: 2007-01-28 14:36:15
Message-ID: 45BCB4DF.50604@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Joris Dobbelsteen wrote:
>>
>> CREATE TABLE attendance
>> (
>> attendanceid serial primary key,
>
> Why you have this??? You already have (entered,timeperiod,studentid)
> that you can use, since that must be unique too. Try to avoid surrogate
> keys as much as possible (it really increases performance and
> ease-of-writing for complex queries!

Correct me if I am wrong, but wouldn't a simple number be a lot easier
to look up than a composite key?

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Joris Dobbelsteen 2007-01-28 15:10:30 Re: counting query
Previous Message Joris Dobbelsteen 2007-01-28 14:11:45 Re: counting query