Re: Netflix Prize data - Mailing list pgsql-hackers

From Mark Woodward
Subject Re: Netflix Prize data
Date
Msg-id 21629.24.91.171.78.1160008114.squirrel@mail.mohawksoft.com
Whole thread Raw
In response to Re: Netflix Prize data  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
> "Mark Woodward" <pgsql@mohawksoft.com> writes:
>> The rating, however, is one char 1~9. Would making it a char(1) buy
>> anything?
>
> No, that would actually hurt because of the length word for the char
> field.  Even if you used the "char" type, which really is only one byte,
> you wouldn't win anything because of alignment issues.  Personally I'd
> just go for three ints and a date, rather than trying to be cute with
> the rating.


Actually, the date is just days, right? I don't actualy need it too much.
So, create a small int for date and do this: smalldate =
date('1970-01-01') - rdate. And use small int for rating.
Column |   Type   | Modifiers
--------+----------+-----------movie  | integer  |client | integer  |day    | smallint |rating | smallint |




pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Netflix Prize data
Next
From: Tom Lane
Date:
Subject: Re: 8.2beta1 failure on IRIX