pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Jim Nasby <jim@nasby.net>
To: Łukasz Walkowski <lukasz.walkowski@homplex.pl>
Cc: pgsql-performance@postgresql.org
Subject: Re: Varchar vs foreign key vs enumerator - table and index size
Date: Thu, 12 Sep 2013 10:07:55 -0500
Message-ID: <5231D8CB.4030907@nasby.net> (raw)
In-Reply-To: <3AAC8AFE-E908-4AF7-ACDE-F9461B4A62D1@homplex.pl>
References: <3AAC8AFE-E908-4AF7-ACDE-F9461B4A62D1@homplex.pl>
List-Unsubscribe:  <mailto:majordomo@postgresql.org?body=unsub%20pgsql-performance>

On 8/31/13 8:35 AM, Łukasz Walkowski wrote:
> 3. And this part is most interesting for me. Columns browser, eventsource, eventtype, devicetype, operatingsystem contain a small pool of strings - for example for devicetype this is set to Computer, Mobile, Tablet or Unknown. Browser is set to normalized browser name. In every case I can store those data using one of 3 different methods:

Sorry for the late reply... the Enova Tools project in pgFoundry has code that lets you create a "dynamic lookup table" that allows for easily normalizing slow-changing data. You could then put a writable view on top of that so that the app wouldn't know the difference. It also has a backfill framework that would help you move data from the old table to the new table.
-- 
Jim C. Nasby, Data Architect                       jim@nasby.net
512.569.9461 (cell)                         http://jim.nasby.net


-- 
Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-performance



view thread (10+ messages)

Message-ID: <5231D8CB.4030907@nasby.net>
Permalink:  ../5231D8CB.4030907@nasby.net/
Also on:    postgresql.org/message-id/5231D8CB.4030907@nasby.net

 · 

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: jim@nasby.net, lukasz.walkowski@homplex.pl
  Subject: Re: Varchar vs foreign key vs enumerator - table and index size
  In-Reply-To: <5231D8CB.4030907@nasby.net>

* 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