Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 21F4B9FB36F for ; Wed, 4 Oct 2006 17:40:23 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 60663-05 for ; Wed, 4 Oct 2006 17:40:18 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from svr4.postgresql.org (svr4.postgresql.org [66.98.251.159]) by postgresql.org (Postfix) with ESMTP id 091289FB203 for ; Wed, 4 Oct 2006 17:40:17 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.3 Received: from outland.mohawksoft.com (unknown [64.46.156.80]) by svr4.postgresql.org (Postfix) with ESMTP id C6E615AF888 for ; Wed, 4 Oct 2006 20:40:16 +0000 (GMT) Received: from outland.mohawksoft.com (localhost.localdomain [127.0.0.1]) by outland.mohawksoft.com (8.13.1/8.9.3) with ESMTP id k94KhhMX009543; Wed, 4 Oct 2006 16:43:43 -0400 Received: (from mohawk@localhost) by outland.mohawksoft.com (8.13.1/8.13.3/Submit) id k94Khhhr009542; Wed, 4 Oct 2006 16:43:43 -0400 X-Authentication-Warning: outland.mohawksoft.com: mohawk set sender to pgsql@mohawksoft.com using -f Received: from 24.91.171.78 (SquirrelMail authenticated user pgsql) by mail.mohawksoft.com with HTTP; Wed, 4 Oct 2006 16:43:42 -0400 (EDT) Message-ID: <18350.24.91.171.78.1159994622.squirrel@mail.mohawksoft.com> Date: Wed, 4 Oct 2006 16:43:42 -0400 (EDT) Subject: Netflix Prize data From: "Mark Woodward" To: pg@mohawksoft.com, pgsql-hackers@postgresql.org User-Agent: SquirrelMail/1.4.7 MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) Importance: Normal X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.1 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200610/246 X-Sequence-Number: 92143 I signed up for the Netflix Prize. (www.netflixprize.com) and downloaded their data and have imported it into PostgreSQL. Here is how I created the table: Table "public.ratings" Column | Type | Modifiers --------+---------+----------- item | integer | client | integer | rating | integer | rdate | text | Indexes: "ratings_client" btree (client) "ratings_item" btree (item) markw@snoopy:~/netflix$ time psql netflix -c "select count(*) from ratings" count ----------- 100480507 (1 row) real 2m6.270s user 0m0.004s sys 0m0.005s The one thing I notice is that it is REAL slow. I know it is, in fact, 100 million records, but I don't think PostgreSQL is usually slow like this. I'm going to check with some other machines to see if there is a problem with my test machine or if something is wierd about PostgreSQL and large numbers of rows. I tried to cluster the data along a particular index but had to cancel it after 3 hours. I'm using 8.1.4. The "rdate" field looks something like: "2005-09-06" So, the raw data is 23 bytes, the date string will probably be rounded up to 12 bytes, that's 24 bytes per row of data. What is the overhead per variable? per row? Is there any advantage to using "varchar(10)" over "text" ?