Skip site navigation (1) Skip section navigation (2)

Re: Space wasted by denormalized data

From: Colin Wetherbee <cww(at)denterprises(dot)org>
To: "Decibel!" <decibel(at)decibel(dot)org>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Space wasted by denormalized data
Date: 2008-02-28 22:12:17
Message-ID: 47C731C1.8080008@denterprises.org (view raw or flat)
Thread:
Lists: pgsql-general
Decibel! wrote:
> I wrote this query to identify how much space is being wasted in a 
> database by denormalized data. For each field in each table, it 
> calculates how much space the field is taking in it's table as well
> as indexes, then it calculates how much space would be needed if that
> field was normalized into a separate table. It places some (somewhat 
> arbitrary) minimums on how much space would have to be saved to
> include that field in the output. If you want to get rid of the limit
> you should still keep savings > 0 in the query, otherwise you'll
> start seeing normalization suggestions that make no sense (like
> normalizing an int).

That's... really cool.

What does this mean? :)

  pg_size_pretty
----------------

(1 row)

Colin

In response to

pgsql-general by date

Next:From: Dan ArmbrustDate: 2008-02-28 23:13:56
Subject: errors in pg_restore on windows?
Previous:From: Decibel!Date: 2008-02-28 21:57:17
Subject: Space wasted by denormalized data

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group