Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id C35D4650160 for ; Sat, 26 Jul 2008 18:22:14 -0300 (ADT) Received: from postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 57663-10 for ; Sat, 26 Jul 2008 18:22:08 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from rv-out-0506.google.com (rv-out-0506.google.com [209.85.198.232]) by postgresql.org (Postfix) with ESMTP id 1F2E3650109 for ; Sat, 26 Jul 2008 18:22:10 -0300 (ADT) Received: by rv-out-0506.google.com with SMTP id b25so4737271rvf.43 for ; Sat, 26 Jul 2008 14:22:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:sender :to:subject:mime-version:content-type:x-google-sender-auth; bh=9EylwLuHNHmo7PCOB6EAY9zpqhLxPo8NsZFjUXbpe44=; b=YGNWJ/3d22LrgQl3tBvLdmiFbHoZVSa73/tTfs1U+8l7uBJQmR3RMQBFXGqXodVUPX 6ysVSJRPxsFVdXb7jW7Z6R/W6GJWorAB3r6rZq9rxdpCP6QR9toUco9V6vwfWYgiEvyy npWIuEC9gsKcNYPbPuRSCJnKyvXuqPRmIxs9I= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:sender:to:subject:mime-version:content-type :x-google-sender-auth; b=xHJv7+5DExR9JYNI0dO3NY31QgVHMmqIcUrImS+djjLOo3wWzpKAFCRA+tDXioEwlU psD30fIhRr5zAyVdbrg/26HhofhxsyDx7bIox+f1NUGoX4mOsXe7bihsQKp7IhNkY2+0 rZruF2W1GOowp8/SivvFJkldNYufSzWAMfNIQ= Received: by 10.141.176.6 with SMTP id d6mr1575026rvp.214.1217107329598; Sat, 26 Jul 2008 14:22:09 -0700 (PDT) Received: by 10.140.177.2 with HTTP; Sat, 26 Jul 2008 14:22:09 -0700 (PDT) Message-ID: Date: Sat, 26 Jul 2008 23:22:09 +0200 From: "David Andersen" To: pgsql-performance@postgresql.org Subject: Using ENUM with huge NAMEDATALEN MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_2364_23579312.1217107329583" X-Google-Sender-Auth: d02f3d88f4009f15 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.001 tagged_above=0 required=5 tests=HTML_MESSAGE=0.001 X-Spam-Level: X-Archive-Number: 200807/227 X-Sequence-Number: 30827 ------=_Part_2364_23579312.1217107329583 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi All, This is my first post so please be gentle if I make any mistakes. I know that ENUMs were not intended to be used instead of joins, but I believe that I my case there will be huge saves on using Enums. Every night I will drop the database and rebuild it from CSV files. The database will be quite large with around 200 million rows in a fact table (only numbers). There are about 10 dimension tables (lookup table with ID and text columns). What is very special is that the software I am 100% dependent on to generate queries, joins the fact table will all dimension tables in all cases. Mostly my queries do not include any WHERE clauses (apart from those needed for joins) only GROUP BY and HAVING. Joining 200 million rows with side tables that on average have about 50000 rows, is heavy. When I need results within 10 seconds, I believe there is a need for Enums. One of the side tables is text with length of up to 900 characters. My question is whether I could build PostgreSQL with NAMEDATALEN (which controls the max size of Enums) equal to 900? Or do you see any things going wrong then (like stability problems or whatever)? Regards, David ------=_Part_2364_23579312.1217107329583 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline
Hi All,

This is my first post so please be gentle if I make any mistakes.

I know that ENUMs were not intended to be used instead of joins, but I believe that I my case there will be huge saves on using Enums. Every night I will drop the database and rebuild it from CSV files. The database will be quite large with around 200 million rows in a fact table (only numbers). There are about 10 dimension tables (lookup table with ID and text columns). What is very special is that the software I am 100% dependent on to generate queries, joins the fact table will all dimension tables in all cases. Mostly my queries do not include any WHERE clauses (apart from those needed for joins) only GROUP BY and HAVING. Joining 200 million rows with side tables that on average have about 50000 rows, is heavy. When I need results within 10 seconds, I believe there is a need for Enums.

One of the side tables is text with length of up to 900 characters. My question is whether I could build PostgreSQL with NAMEDATALEN  (which controls the max size of Enums) equal to 900? Or do you see any things going wrong then (like stability problems or whatever)?

Regards,

David
------=_Part_2364_23579312.1217107329583--