On 10/29/2010 1:36 PM, Josh Berkus wrote:
> Is the same event_id value shared by more than on club_id? If so, then
> clustering won't benefit you at all for event_id queries.
Jeff and Josh, thanks for the replies. Sorry I didn't clarify this in
the original post but event_ids are unique to club_id.
Jeff Davis wrote:
> - an event is only associated with one club (event_id determines
> club_id)
> - the combination of event and type is unique, but event is not
> unique by itself (is this true?)
event_id does not need type to be unique actually; in this particular
table 'where event_id = x' would be enough to return the right rows for
our purposes.
Sounds like the clustered index on (club_id, event_id) will get the job
done? Thanks!
Brian
In response to
sfpug by date
| Next: | From: Richard Broersma | Date: 2010-10-29 23:03:59 |
| Subject: Call For Talks: PGDay LA @ SCALE 9X |
| Previous: | From: Josh Berkus | Date: 2010-10-29 20:36:45 |
| Subject: Re: Clustered index when not always in the WHERE clause |