pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: David Andersen <david@andersen.gs>
To: pgsql-performance@postgresql.org
Subject: Using ENUM with huge NAMEDATALEN
Date: Sat, 26 Jul 2008 23:22:09 +0200
Message-ID: <c6bf5b380807261422i77ed5b3evf55da6891e2e4170@mail.gmail.com> (raw)

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

view thread (5+ messages)  latest in thread

Message-ID: <c6bf5b380807261422i77ed5b3evf55da6891e2e4170@mail.gmail.com>
Permalink:  ../c6bf5b380807261422i77ed5b3evf55da6891e2e4170@mail.gmail.com/
Also on:    postgresql.org/message-id/c6bf5b380807261422i77ed5b3evf55da6891e2e4170@mail.gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: david@andersen.gs
  Subject: Re: Using ENUM with huge NAMEDATALEN
  In-Reply-To: <c6bf5b380807261422i77ed5b3evf55da6891e2e4170@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox