Re: Reducing the overhead of NUMERIC data

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Stephan Szabo <sszabo(at)megazone(dot)bigpanda(dot)com>
Cc: Simon Riggs <simon(at)2ndquadrant(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Andrew Dunstan <andrew(at)dunslane(dot)net>, "Jim C(dot) Nasby" <jnasby(at)pervasive(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Reducing the overhead of NUMERIC data
Date: 2005-11-03 15:09:39
Message-ID: 200511031509.jA3F9da03345@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

Stephan Szabo wrote:
>
> On Thu, 3 Nov 2005, Simon Riggs wrote:
>
> > On Wed, 2005-11-02 at 19:12 -0500, Tom Lane wrote:
> > > Andrew Dunstan <andrew(at)dunslane(dot)net> writes:
> > > > Could someone please quantify how much bang we might get for what seems
> > > > like quite a lot of bucks?
> > > > I appreciate the need for speed, but the saving here strikes me as
> > > > marginal at best, unless my instincts are all wrong (quite possible)
> > >
> > > Two bytes per numeric value is not a lot, agreed.
> >
> > I'm optimising for Data Warehousing. If you have a very large table with
> > a higher proportion of numerics on it, then your saving can be >5% of
> > tablesize which could be very useful. For the general user, it might
> > produce less benefit, I accept.
> >
> > At the moment we've established we can do this fairly much for free.
> > i.e. nobody cares about the drop in digits (to 255) and the other coding
>
> I don't believe the above is safe to say, yet. AFAICS, this has been
> discussed only on hackers (and patches) in this discussion, whereas this
> sort of change should probably be brought up on general as well to get a
> greater understanding of whether there are people who care. I expect that
> there won't be, but given that I'm still not sure what the plan to support
> applications upward is for this change, I think it's probably a good idea
> to query a larger segment of the population.

Agreed. With the proposal, we are saving perhaps 5% storage space for
numeric fields, but are adding code complexity and reducing its possible
precision.

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2005-11-03 15:32:03 Re: Reducing the overhead of NUMERIC data
Previous Message Marcus Engene 2005-11-03 15:07:41 Re: Reducing the overhead of NUMERIC data

Browse pgsql-patches by date

  From Date Subject
Next Message Tom Lane 2005-11-03 15:32:03 Re: Reducing the overhead of NUMERIC data
Previous Message Marcus Engene 2005-11-03 15:07:41 Re: Reducing the overhead of NUMERIC data